@pksep/zod-shared 0.0.537 → 0.0.539
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/assemble/dto/get-assemble-pagination-sclad.dto.d.ts +3 -0
- package/dist/assemble/dto/get-assemble-pagination-sclad.dto.js +1 -0
- package/dist/assemble/interfaces/interfaces.d.ts +3 -0
- package/dist/cbed/dto/get-deficit.dto.d.ts +3 -0
- package/dist/cbed/dto/get-deficit.dto.js +1 -0
- package/dist/detal/dto/get-deficit.dto.d.ts +3 -0
- package/dist/detal/dto/get-deficit.dto.js +1 -0
- package/dist/metaloworking/dto/get-metallworking-pagination.dto.d.ts +3 -0
- package/dist/metaloworking/dto/get-metallworking-pagination.dto.js +1 -0
- package/dist/product/dto/get-deficit.dto.d.ts +3 -0
- package/dist/product/dto/get-deficit.dto.js +1 -0
- package/dist/production-tasks/dto/get-production-task-by-equipment.dto.d.ts +6 -0
- package/dist/production-tasks/dto/get-production-task-by-equipment.dto.js +2 -0
- package/dist/production-tasks/dto/get-production-task-by-operation.dto.d.ts +3 -0
- package/dist/production-tasks/dto/get-production-task-by-operation.dto.js +1 -0
- package/dist/production-tasks/interfaces/production-tasks.d.ts +2 -0
- package/dist/utils/date.methods.js +3 -5
- 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 +2 -1
- package/dist/utils/tables-config/enum.d.ts +1 -0
- package/dist/utils/tables-config/enum.js +3 -0
- package/dist/utils/tables-config/methods.js +40 -12
- package/dist/utils/tables-config/tables-array.js +9 -4
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ export declare const GetAssembleScladPaginationDtoZod: z.ZodObject<{
|
|
|
8
8
|
byParents: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByParents, z.ZodTypeDef, IFiltersByParents>>>;
|
|
9
9
|
type: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof AssembleIzdEnum>>>>;
|
|
10
10
|
byOrder: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByByOrder, z.ZodTypeDef, IFiltersByByOrder>>>;
|
|
11
|
+
isDiscontinued: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
11
12
|
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
13
|
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
13
14
|
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -26,6 +27,7 @@ export declare const GetAssembleScladPaginationDtoZod: z.ZodObject<{
|
|
|
26
27
|
}[];
|
|
27
28
|
page: number;
|
|
28
29
|
searchString: string;
|
|
30
|
+
isDiscontinued: boolean | null;
|
|
29
31
|
responsibleUserId?: number | null | undefined;
|
|
30
32
|
byParents?: IFiltersByParents | null | undefined;
|
|
31
33
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
@@ -38,6 +40,7 @@ export declare const GetAssembleScladPaginationDtoZod: z.ZodObject<{
|
|
|
38
40
|
sortDesc?: boolean | undefined;
|
|
39
41
|
}[] | undefined;
|
|
40
42
|
responsibleUserId?: number | null | undefined;
|
|
43
|
+
isDiscontinued?: boolean | null | undefined;
|
|
41
44
|
byParents?: IFiltersByParents | null | undefined;
|
|
42
45
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
43
46
|
}>;
|
|
@@ -10,5 +10,6 @@ exports.GetAssembleScladPaginationDtoZod = zod_1.z.object({
|
|
|
10
10
|
byParents: zod_1.z.custom().nullable().optional(),
|
|
11
11
|
type: zod_1.z.nativeEnum(utils_1.AssembleIzdEnum).nullish().default(utils_1.AssembleIzdEnum.all),
|
|
12
12
|
byOrder: zod_1.z.custom().nullable().optional(),
|
|
13
|
+
isDiscontinued: zod_1.z.boolean().nullable().optional().default(false),
|
|
13
14
|
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
14
15
|
});
|
|
@@ -57,6 +57,7 @@ export interface IChangeInKitQuantity {
|
|
|
57
57
|
export interface IChangeCreateMarksComplect {
|
|
58
58
|
kitsSelected: IKitSelected[];
|
|
59
59
|
marks: any[];
|
|
60
|
+
userId?: number;
|
|
60
61
|
relativeActionId?: number;
|
|
61
62
|
isWaybill: boolean;
|
|
62
63
|
transaction?: any;
|
|
@@ -83,6 +84,7 @@ export interface ICreateMovementObject {
|
|
|
83
84
|
waybill_id?: number;
|
|
84
85
|
revision_id?: number;
|
|
85
86
|
sh_complit_id?: number;
|
|
87
|
+
user_id?: number;
|
|
86
88
|
detal_id?: number;
|
|
87
89
|
cbed_id?: number;
|
|
88
90
|
product_id?: number;
|
|
@@ -94,6 +96,7 @@ type KitsSelected = {
|
|
|
94
96
|
export interface IChangeShipmentsAssemblyKits {
|
|
95
97
|
kitsSelected: KitsSelected[];
|
|
96
98
|
userId?: number;
|
|
99
|
+
relativeActionId?: number;
|
|
97
100
|
transaction: any;
|
|
98
101
|
}
|
|
99
102
|
export interface IGetKitsByParents {
|
|
@@ -6,6 +6,7 @@ export declare const GetDeficitDtoZod: z.ZodObject<{
|
|
|
6
6
|
statusWorking: z.ZodNativeEnum<typeof statusWorkingsDeficit>;
|
|
7
7
|
searchString: z.ZodString;
|
|
8
8
|
shipmentIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
|
|
9
|
+
isDiscontinued: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
9
10
|
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
11
|
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
11
12
|
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -22,6 +23,7 @@ export declare const GetDeficitDtoZod: z.ZodObject<{
|
|
|
22
23
|
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
23
24
|
}[];
|
|
24
25
|
searchString: string;
|
|
26
|
+
isDiscontinued: boolean | null;
|
|
25
27
|
statusWorking: statusWorkingsDeficit;
|
|
26
28
|
cbedIds: number[];
|
|
27
29
|
page?: number | null | undefined;
|
|
@@ -35,6 +37,7 @@ export declare const GetDeficitDtoZod: z.ZodObject<{
|
|
|
35
37
|
sortDesc?: boolean | undefined;
|
|
36
38
|
}[] | undefined;
|
|
37
39
|
page?: number | null | undefined;
|
|
40
|
+
isDiscontinued?: boolean | null | undefined;
|
|
38
41
|
shipmentIds?: number[] | null | undefined;
|
|
39
42
|
}>;
|
|
40
43
|
export type GetDeficitDtoZodType = z.infer<typeof GetDeficitDtoZod>;
|
|
@@ -9,5 +9,6 @@ exports.GetDeficitDtoZod = zod_1.z.object({
|
|
|
9
9
|
statusWorking: zod_1.z.nativeEnum(utils_1.statusWorkingsDeficit),
|
|
10
10
|
searchString: zod_1.z.string(),
|
|
11
11
|
shipmentIds: zod_1.z.array(zod_1.z.number()).nullable().optional(),
|
|
12
|
+
isDiscontinued: zod_1.z.boolean().nullable().optional().default(false),
|
|
12
13
|
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
13
14
|
});
|
|
@@ -6,6 +6,7 @@ export declare const GetDetalDeficitDtoZod: z.ZodObject<{
|
|
|
6
6
|
searchString: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
7
7
|
shipmentIds: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>>;
|
|
8
8
|
page: z.ZodNumber;
|
|
9
|
+
isDiscontinued: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
9
10
|
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
11
|
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
11
12
|
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -23,6 +24,7 @@ export declare const GetDetalDeficitDtoZod: z.ZodObject<{
|
|
|
23
24
|
}[];
|
|
24
25
|
page: number;
|
|
25
26
|
searchString: string;
|
|
27
|
+
isDiscontinued: boolean;
|
|
26
28
|
detalIds: number[];
|
|
27
29
|
statusWorking: statusWorkingsDeficit;
|
|
28
30
|
shipmentIds: number[] | null;
|
|
@@ -33,6 +35,7 @@ export declare const GetDetalDeficitDtoZod: z.ZodObject<{
|
|
|
33
35
|
sortDesc?: boolean | undefined;
|
|
34
36
|
}[] | undefined;
|
|
35
37
|
searchString?: string | undefined;
|
|
38
|
+
isDiscontinued?: boolean | undefined;
|
|
36
39
|
detalIds?: number[] | undefined;
|
|
37
40
|
statusWorking?: statusWorkingsDeficit | undefined;
|
|
38
41
|
shipmentIds?: number[] | null | undefined;
|
|
@@ -12,5 +12,6 @@ exports.GetDetalDeficitDtoZod = zod_1.z.object({
|
|
|
12
12
|
searchString: zod_1.z.string().optional().default(''),
|
|
13
13
|
shipmentIds: zod_1.z.number().int().array().optional().nullable().default(null),
|
|
14
14
|
page: zod_1.z.number().int(),
|
|
15
|
+
isDiscontinued: zod_1.z.boolean().optional().default(false),
|
|
15
16
|
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
16
17
|
});
|
|
@@ -8,6 +8,7 @@ export declare const GetMetaloworkingPaginationDtoZod: z.ZodObject<{
|
|
|
8
8
|
byParents: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByParents, z.ZodTypeDef, IFiltersByParents>>>;
|
|
9
9
|
byOrder: z.ZodOptional<z.ZodNullable<z.ZodType<IFiltersByByOrder, z.ZodTypeDef, IFiltersByByOrder>>>;
|
|
10
10
|
childrenByProductionTaskIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
11
|
+
isDiscontinued: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
11
12
|
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
13
|
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
13
14
|
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -26,6 +27,7 @@ export declare const GetMetaloworkingPaginationDtoZod: z.ZodObject<{
|
|
|
26
27
|
page: number;
|
|
27
28
|
searchString: string;
|
|
28
29
|
isBan: boolean;
|
|
30
|
+
isDiscontinued: boolean | null;
|
|
29
31
|
responsibleUserId?: number | null | undefined;
|
|
30
32
|
byParents?: IFiltersByParents | null | undefined;
|
|
31
33
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
@@ -39,6 +41,7 @@ export declare const GetMetaloworkingPaginationDtoZod: z.ZodObject<{
|
|
|
39
41
|
sortDesc?: boolean | undefined;
|
|
40
42
|
}[] | undefined;
|
|
41
43
|
responsibleUserId?: number | null | undefined;
|
|
44
|
+
isDiscontinued?: boolean | null | undefined;
|
|
42
45
|
byParents?: IFiltersByParents | null | undefined;
|
|
43
46
|
byOrder?: IFiltersByByOrder | null | undefined;
|
|
44
47
|
childrenByProductionTaskIds?: number[] | null | undefined;
|
|
@@ -11,5 +11,6 @@ exports.GetMetaloworkingPaginationDtoZod = zod_1.z.object({
|
|
|
11
11
|
byParents: zod_1.z.custom().nullable().optional(),
|
|
12
12
|
byOrder: zod_1.z.custom().nullable().optional(),
|
|
13
13
|
childrenByProductionTaskIds: zod_1.z.array(zod_1.z.number()).optional().nullable(),
|
|
14
|
+
isDiscontinued: zod_1.z.boolean().nullable().optional().default(false),
|
|
14
15
|
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
15
16
|
});
|
|
@@ -6,6 +6,7 @@ export declare const GetDeficitProductSchema: z.ZodObject<{
|
|
|
6
6
|
searchString: z.ZodString;
|
|
7
7
|
shipmentIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
8
8
|
page: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
isDiscontinued: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
|
|
9
10
|
sort: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
11
|
sortField: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../../utils").ProductionPlanSortField>>>;
|
|
11
12
|
sortDesc: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -22,6 +23,7 @@ export declare const GetDeficitProductSchema: z.ZodObject<{
|
|
|
22
23
|
sortField?: import("../../utils").ProductionPlanSortField | null | undefined;
|
|
23
24
|
}[];
|
|
24
25
|
searchString: string;
|
|
26
|
+
isDiscontinued: boolean | null;
|
|
25
27
|
statusWorking: statusWorkingsDeficit;
|
|
26
28
|
productIds: number[];
|
|
27
29
|
page?: number | undefined;
|
|
@@ -35,6 +37,7 @@ export declare const GetDeficitProductSchema: z.ZodObject<{
|
|
|
35
37
|
sortDesc?: boolean | undefined;
|
|
36
38
|
}[] | undefined;
|
|
37
39
|
page?: number | undefined;
|
|
40
|
+
isDiscontinued?: boolean | null | undefined;
|
|
38
41
|
shipmentIds?: number[] | null | undefined;
|
|
39
42
|
}>;
|
|
40
43
|
export type GetDeficitProductDtoType = z.infer<typeof GetDeficitProductSchema>;
|
|
@@ -9,5 +9,6 @@ exports.GetDeficitProductSchema = zod_1.z.object({
|
|
|
9
9
|
searchString: zod_1.z.string(),
|
|
10
10
|
shipmentIds: zod_1.z.number().int().array().optional().nullable(),
|
|
11
11
|
page: zod_1.z.number().int().optional(),
|
|
12
|
+
isDiscontinued: zod_1.z.boolean().nullable().optional().default(false),
|
|
12
13
|
sort: zod_1.z.array(utils_1.ProductionPlanSortRuleSchema).optional().default([])
|
|
13
14
|
});
|
|
@@ -3,6 +3,7 @@ import { WorkStartCalcTypeFilter } from '../../operations/enums/enums';
|
|
|
3
3
|
export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
|
|
4
4
|
equipmentId: z.ZodNumber;
|
|
5
5
|
searchString: z.ZodOptional<z.ZodString>;
|
|
6
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
6
7
|
taskId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7
8
|
range: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
8
9
|
start: z.ZodAny;
|
|
@@ -15,9 +16,12 @@ export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
|
|
|
15
16
|
end?: any;
|
|
16
17
|
}>>>;
|
|
17
18
|
onlyTOperation: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
isShowCbed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
18
20
|
workStartCalcTypeFilter: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof WorkStartCalcTypeFilter>, "many">>;
|
|
19
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
page: number;
|
|
20
23
|
equipmentId: number;
|
|
24
|
+
isShowCbed: boolean;
|
|
21
25
|
searchString?: string | undefined;
|
|
22
26
|
range?: {
|
|
23
27
|
start?: any;
|
|
@@ -28,6 +32,7 @@ export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
|
|
|
28
32
|
workStartCalcTypeFilter?: WorkStartCalcTypeFilter[] | undefined;
|
|
29
33
|
}, {
|
|
30
34
|
equipmentId: number;
|
|
35
|
+
page?: number | undefined;
|
|
31
36
|
searchString?: string | undefined;
|
|
32
37
|
range?: {
|
|
33
38
|
start?: any;
|
|
@@ -36,5 +41,6 @@ export declare const GetProductionTaskByEquipmentDtoZod: z.ZodObject<{
|
|
|
36
41
|
taskId?: number | null | undefined;
|
|
37
42
|
onlyTOperation?: number | undefined;
|
|
38
43
|
workStartCalcTypeFilter?: WorkStartCalcTypeFilter[] | undefined;
|
|
44
|
+
isShowCbed?: boolean | undefined;
|
|
39
45
|
}>;
|
|
40
46
|
export type GetProductionTaskByEquipmentDtoZodType = z.infer<typeof GetProductionTaskByEquipmentDtoZod>;
|
|
@@ -6,6 +6,7 @@ const enums_1 = require("../../operations/enums/enums");
|
|
|
6
6
|
exports.GetProductionTaskByEquipmentDtoZod = zod_1.z.object({
|
|
7
7
|
equipmentId: zod_1.z.number().int(),
|
|
8
8
|
searchString: zod_1.z.string().optional(),
|
|
9
|
+
page: zod_1.z.number().default(0),
|
|
9
10
|
taskId: zod_1.z.number().int().nullish(),
|
|
10
11
|
range: zod_1.z
|
|
11
12
|
.object({
|
|
@@ -15,6 +16,7 @@ exports.GetProductionTaskByEquipmentDtoZod = zod_1.z.object({
|
|
|
15
16
|
.nullable()
|
|
16
17
|
.optional(),
|
|
17
18
|
onlyTOperation: zod_1.z.number().int().optional(),
|
|
19
|
+
isShowCbed: zod_1.z.boolean().optional().default(false),
|
|
18
20
|
workStartCalcTypeFilter: zod_1.z
|
|
19
21
|
.array(zod_1.z.nativeEnum(enums_1.WorkStartCalcTypeFilter))
|
|
20
22
|
.optional()
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { StockOrderType } from '../../utils';
|
|
3
3
|
export declare const GetProductionTaskByOperationDtoZod: z.ZodObject<{
|
|
4
4
|
operationTypeId: z.ZodNumber;
|
|
5
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
5
6
|
searchString: z.ZodOptional<z.ZodString>;
|
|
6
7
|
taskId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
7
8
|
onlyTOperation: z.ZodOptional<z.ZodNumber>;
|
|
@@ -18,6 +19,7 @@ export declare const GetProductionTaskByOperationDtoZod: z.ZodObject<{
|
|
|
18
19
|
equipmentIds: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>>;
|
|
19
20
|
productionOperationType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof StockOrderType>>>;
|
|
20
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
page: number;
|
|
21
23
|
equipmentIds: number[] | null;
|
|
22
24
|
operationTypeId: number;
|
|
23
25
|
searchString?: string | undefined;
|
|
@@ -30,6 +32,7 @@ export declare const GetProductionTaskByOperationDtoZod: z.ZodObject<{
|
|
|
30
32
|
productionOperationType?: StockOrderType | null | undefined;
|
|
31
33
|
}, {
|
|
32
34
|
operationTypeId: number;
|
|
35
|
+
page?: number | undefined;
|
|
33
36
|
equipmentIds?: number[] | null | undefined;
|
|
34
37
|
searchString?: string | undefined;
|
|
35
38
|
range?: {
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
exports.GetProductionTaskByOperationDtoZod = zod_1.z.object({
|
|
7
7
|
operationTypeId: zod_1.z.number().int(),
|
|
8
|
+
page: zod_1.z.number().int().min(0).default(0),
|
|
8
9
|
searchString: zod_1.z.string().optional(),
|
|
9
10
|
taskId: zod_1.z.number().int().nullable().default(null).optional(),
|
|
10
11
|
onlyTOperation: zod_1.z.number().int().optional(),
|
|
@@ -13,6 +13,7 @@ import { ModelDetal } from '../../detal';
|
|
|
13
13
|
import { ModelCbed } from '../../cbed';
|
|
14
14
|
import { ModelProduct } from '../../product/schemas/product.schema';
|
|
15
15
|
import { ModelProductionOperationPos } from '../schemas/production-operation-pos.schema';
|
|
16
|
+
import { ModelMaterial } from '../../material';
|
|
16
17
|
export interface IMarkExecute {
|
|
17
18
|
quantity: number;
|
|
18
19
|
executionTime: number;
|
|
@@ -255,6 +256,7 @@ export interface IGetByEquipment {
|
|
|
255
256
|
attention: boolean;
|
|
256
257
|
discontinued: boolean;
|
|
257
258
|
id: number;
|
|
259
|
+
material?: ModelMaterial | null;
|
|
258
260
|
};
|
|
259
261
|
detalIdx: number;
|
|
260
262
|
calculatedCreateTime: Date;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DateMethods = void 0;
|
|
4
|
+
const methods_1 = require("./methods");
|
|
4
5
|
/**
|
|
5
6
|
* @returns date: DD.MM.YYYY
|
|
6
7
|
* @returns time: H:M.S
|
|
@@ -64,9 +65,6 @@ class DateMethods {
|
|
|
64
65
|
const end = calculatedCreateTimeDate <= planReadyTimeDate
|
|
65
66
|
? planReadyTimeDate
|
|
66
67
|
: calculatedCreateTimeDate;
|
|
67
|
-
const workDayStartHour = 5;
|
|
68
|
-
const workDayHours = 8;
|
|
69
|
-
const workDayEndHour = workDayStartHour + workDayHours;
|
|
70
68
|
const isWorkDay = (date) => {
|
|
71
69
|
var _a, _b;
|
|
72
70
|
const dayOfWeek = date.getUTCDay();
|
|
@@ -93,9 +91,9 @@ class DateMethods {
|
|
|
93
91
|
continue;
|
|
94
92
|
}
|
|
95
93
|
const workStart = new Date(current);
|
|
96
|
-
workStart.setUTCHours(
|
|
94
|
+
workStart.setUTCHours(methods_1.WORK_DAY_START_HOUR, 0, 0, 0);
|
|
97
95
|
const workEnd = new Date(current);
|
|
98
|
-
workEnd.setUTCHours(
|
|
96
|
+
workEnd.setUTCHours(methods_1.WORK_DAY_END_HOUR, methods_1.WORK_DAY_END_MINUTE, 0, 0);
|
|
99
97
|
const actualStart = current > workStart ? current : workStart;
|
|
100
98
|
const actualEnd = end < workEnd ? end : workEnd;
|
|
101
99
|
if (actualStart < actualEnd) {
|
package/dist/utils/enums.d.ts
CHANGED
package/dist/utils/enums.js
CHANGED
|
@@ -180,6 +180,7 @@ var ModuleInclude;
|
|
|
180
180
|
ModuleInclude["document"] = "document";
|
|
181
181
|
ModuleInclude["material"] = "material";
|
|
182
182
|
ModuleInclude["shipments"] = "shipments";
|
|
183
|
+
ModuleInclude["stock_order"] = "stock_order";
|
|
183
184
|
ModuleInclude["techProcess"] = "techProcess";
|
|
184
185
|
ModuleInclude["mat_za_obj"] = "mat_za_obj";
|
|
185
186
|
ModuleInclude["user"] = "user";
|
package/dist/utils/sorting.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export declare enum ProductionPlanSortField {
|
|
|
6
6
|
calculatedCreateTime = "calculatedCreateTime",
|
|
7
7
|
warehouseReadinessDate = "warehouseReadinessDate",
|
|
8
8
|
orderedByProduction = "orderedByProduction",
|
|
9
|
-
productionDelay = "productionDelay"
|
|
9
|
+
productionDelay = "productionDelay",
|
|
10
|
+
startTimeDelay = "startTimeDelay"
|
|
10
11
|
}
|
|
11
12
|
export type ProductionPlanSortRule = {
|
|
12
13
|
sortField?: ProductionPlanSortField | null;
|
package/dist/utils/sorting.js
CHANGED
|
@@ -10,6 +10,7 @@ var ProductionPlanSortField;
|
|
|
10
10
|
ProductionPlanSortField["warehouseReadinessDate"] = "warehouseReadinessDate";
|
|
11
11
|
ProductionPlanSortField["orderedByProduction"] = "orderedByProduction";
|
|
12
12
|
ProductionPlanSortField["productionDelay"] = "productionDelay";
|
|
13
|
+
ProductionPlanSortField["startTimeDelay"] = "startTimeDelay";
|
|
13
14
|
})(ProductionPlanSortField || (exports.ProductionPlanSortField = ProductionPlanSortField = {}));
|
|
14
15
|
exports.ProductionPlanSortRuleSchema = zod_1.z.object({
|
|
15
16
|
sortField: zod_1.z.nativeEnum(ProductionPlanSortField).nullable().optional(),
|
|
@@ -40,7 +41,7 @@ const compareValues = (firstValue, secondValue, desc = false) => {
|
|
|
40
41
|
if (isFirstNull || isSecondNull) {
|
|
41
42
|
if (isFirstNull && isSecondNull)
|
|
42
43
|
return 0;
|
|
43
|
-
return isFirstNull ? (desc ? 1 :
|
|
44
|
+
return isFirstNull ? (desc ? -1 : 1) : desc ? 1 : -1;
|
|
44
45
|
}
|
|
45
46
|
const normalizedFirstValue = normalizeSortValue(firstValue);
|
|
46
47
|
const normalizedSecondValue = normalizeSortValue(secondValue);
|
|
@@ -11,6 +11,7 @@ export declare enum tablesEnumConfig {
|
|
|
11
11
|
calculateAssembleTime = "calculateAssembleTime",
|
|
12
12
|
orderedByProduction = "orderedByProduction",
|
|
13
13
|
productionDelay = "productionDelay",
|
|
14
|
+
startTimeDelay = "startTimeDelay",
|
|
14
15
|
ordered = "ordered",
|
|
15
16
|
deficitChildCreateTime = "deficitChildCreateTime",
|
|
16
17
|
remainingByProductionTask = "remainingByProductionTask",
|
|
@@ -23,7 +23,10 @@ var tablesEnumConfig;
|
|
|
23
23
|
tablesEnumConfig["calculateAssembleTime"] = "calculateAssembleTime";
|
|
24
24
|
// заказано по ПЗ
|
|
25
25
|
tablesEnumConfig["orderedByProduction"] = "orderedByProduction";
|
|
26
|
+
// просрочка изготовления
|
|
26
27
|
tablesEnumConfig["productionDelay"] = "productionDelay";
|
|
28
|
+
// просрочка начала работ
|
|
29
|
+
tablesEnumConfig["startTimeDelay"] = "startTimeDelay";
|
|
27
30
|
// заказано
|
|
28
31
|
tablesEnumConfig["ordered"] = "ordered";
|
|
29
32
|
// Время изг. дефицитных Д/СБ
|
|
@@ -29,24 +29,52 @@ const createCorrectColumnConfig = (columns, arrayToCheck) => {
|
|
|
29
29
|
const uniqueColumns = new Map();
|
|
30
30
|
columns
|
|
31
31
|
.filter(currentColumn => availableColumns.has(currentColumn.columnName))
|
|
32
|
-
.sort((leftColumn, rightColumn) =>
|
|
32
|
+
.sort((leftColumn, rightColumn) => {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
const leftPosition = (_a = leftColumn.position) !== null && _a !== void 0 ? _a : 0;
|
|
35
|
+
const rightPosition = (_b = rightColumn.position) !== null && _b !== void 0 ? _b : 0;
|
|
36
|
+
return leftPosition - rightPosition;
|
|
37
|
+
})
|
|
33
38
|
.forEach(currentColumn => {
|
|
39
|
+
if (uniqueColumns.has(currentColumn.columnName))
|
|
40
|
+
return;
|
|
34
41
|
uniqueColumns.set(currentColumn.columnName, currentColumn);
|
|
35
42
|
});
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
const normalizedOrder = Array.from(uniqueColumns.keys());
|
|
44
|
+
/**
|
|
45
|
+
* Вычисляет индекс колонки по эталонному порядку
|
|
46
|
+
*/
|
|
47
|
+
const getActualInsertIndex = (currentColumn) => {
|
|
48
|
+
const currentIndex = arrayToCheck.indexOf(currentColumn);
|
|
49
|
+
for (let leftIndex = currentIndex - 1; leftIndex >= 0; leftIndex -= 1) {
|
|
50
|
+
const existedIndex = normalizedOrder.indexOf(arrayToCheck[leftIndex]);
|
|
51
|
+
if (existedIndex !== -1)
|
|
52
|
+
return existedIndex + 1;
|
|
53
|
+
}
|
|
54
|
+
for (let rightIndex = currentIndex + 1; rightIndex < arrayToCheck.length; rightIndex += 1) {
|
|
55
|
+
const existedIndex = normalizedOrder.indexOf(arrayToCheck[rightIndex]);
|
|
56
|
+
if (existedIndex !== -1)
|
|
57
|
+
return existedIndex;
|
|
58
|
+
}
|
|
59
|
+
return normalizedOrder.length;
|
|
60
|
+
};
|
|
42
61
|
arrayToCheck.forEach(currentItem => {
|
|
43
62
|
if (uniqueColumns.has(currentItem))
|
|
44
63
|
return;
|
|
45
|
-
|
|
46
|
-
columnName: currentItem,
|
|
47
|
-
isShow: true
|
|
48
|
-
});
|
|
64
|
+
normalizedOrder.splice(getActualInsertIndex(currentItem), 0, currentItem);
|
|
49
65
|
});
|
|
50
|
-
return addPositionForColumns(
|
|
66
|
+
return addPositionForColumns(normalizedOrder.map(currentColumn => {
|
|
67
|
+
const savedColumn = uniqueColumns.get(currentColumn);
|
|
68
|
+
if (savedColumn) {
|
|
69
|
+
return {
|
|
70
|
+
columnName: savedColumn.columnName,
|
|
71
|
+
isShow: savedColumn.isShow
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
columnName: currentColumn,
|
|
76
|
+
isShow: true
|
|
77
|
+
};
|
|
78
|
+
}));
|
|
51
79
|
};
|
|
52
80
|
exports.createCorrectColumnConfig = createCorrectColumnConfig;
|
|
@@ -13,7 +13,7 @@ exports.metalloworkingTableConfig = [
|
|
|
13
13
|
enum_1.tablesEnumConfig.orderedByProduction,
|
|
14
14
|
enum_1.tablesEnumConfig.ordered,
|
|
15
15
|
enum_1.tablesEnumConfig.dateByUrgency,
|
|
16
|
-
enum_1.tablesEnumConfig.
|
|
16
|
+
enum_1.tablesEnumConfig.productionDelay,
|
|
17
17
|
enum_1.tablesEnumConfig.workpieceParameters,
|
|
18
18
|
enum_1.tablesEnumConfig.material,
|
|
19
19
|
enum_1.tablesEnumConfig.operationsLength,
|
|
@@ -36,6 +36,7 @@ exports.metalDeficitByAssembleTableConfig = [
|
|
|
36
36
|
enum_1.tablesEnumConfig.deficitByProductionTask,
|
|
37
37
|
enum_1.tablesEnumConfig.orderedByProduction,
|
|
38
38
|
enum_1.tablesEnumConfig.ordered,
|
|
39
|
+
enum_1.tablesEnumConfig.productionDelay,
|
|
39
40
|
enum_1.tablesEnumConfig.operationsLength,
|
|
40
41
|
enum_1.tablesEnumConfig.operationList,
|
|
41
42
|
enum_1.tablesEnumConfig.totalTimePerItem,
|
|
@@ -56,10 +57,10 @@ exports.onlineBoardProductionTableConfig = [
|
|
|
56
57
|
enum_1.tablesEnumConfig.calculatedCreateTime,
|
|
57
58
|
enum_1.tablesEnumConfig.warehouseReadinessDate,
|
|
58
59
|
enum_1.tablesEnumConfig.calculateNeedsTime,
|
|
59
|
-
enum_1.tablesEnumConfig.dateShipment,
|
|
60
60
|
enum_1.tablesEnumConfig.deficitByCurrentProductionTask,
|
|
61
61
|
enum_1.tablesEnumConfig.deficitByProductionTask,
|
|
62
62
|
enum_1.tablesEnumConfig.ordered,
|
|
63
|
+
enum_1.tablesEnumConfig.productionDelay,
|
|
63
64
|
enum_1.tablesEnumConfig.readyToComplect,
|
|
64
65
|
enum_1.tablesEnumConfig.operationsLength,
|
|
65
66
|
enum_1.tablesEnumConfig.operationList,
|
|
@@ -79,9 +80,9 @@ exports.onlineBoardTableConfig = [
|
|
|
79
80
|
enum_1.tablesEnumConfig.startTime,
|
|
80
81
|
enum_1.tablesEnumConfig.calculatedCreateTime,
|
|
81
82
|
enum_1.tablesEnumConfig.calculateNeedsTime,
|
|
82
|
-
enum_1.tablesEnumConfig.dateShipment,
|
|
83
83
|
enum_1.tablesEnumConfig.deficitByProductionTask,
|
|
84
84
|
enum_1.tablesEnumConfig.ordered,
|
|
85
|
+
enum_1.tablesEnumConfig.productionDelay,
|
|
85
86
|
enum_1.tablesEnumConfig.readyToComplect,
|
|
86
87
|
enum_1.tablesEnumConfig.operationsLength,
|
|
87
88
|
enum_1.tablesEnumConfig.operationList,
|
|
@@ -101,7 +102,7 @@ exports.assembleTableConfig = [
|
|
|
101
102
|
enum_1.tablesEnumConfig.calculatedCreateTime,
|
|
102
103
|
enum_1.tablesEnumConfig.calculateNeedsTime,
|
|
103
104
|
enum_1.tablesEnumConfig.dateByUrgency,
|
|
104
|
-
enum_1.tablesEnumConfig.
|
|
105
|
+
enum_1.tablesEnumConfig.productionDelay,
|
|
105
106
|
enum_1.tablesEnumConfig.operationsLength,
|
|
106
107
|
enum_1.tablesEnumConfig.readyInProcent,
|
|
107
108
|
enum_1.tablesEnumConfig.readyToComplect,
|
|
@@ -148,6 +149,8 @@ exports.productionTaskByOperationTableConfig = [
|
|
|
148
149
|
enum_1.tablesEnumConfig.image,
|
|
149
150
|
enum_1.tablesEnumConfig.designation,
|
|
150
151
|
enum_1.tablesEnumConfig.name,
|
|
152
|
+
enum_1.tablesEnumConfig.workpieceParameters,
|
|
153
|
+
enum_1.tablesEnumConfig.material,
|
|
151
154
|
enum_1.tablesEnumConfig.startTime,
|
|
152
155
|
enum_1.tablesEnumConfig.calculatedCreateTime,
|
|
153
156
|
enum_1.tablesEnumConfig.calculateNeedsTime,
|
|
@@ -176,6 +179,8 @@ exports.productionTaskByEquipmentTableConfig = [
|
|
|
176
179
|
enum_1.tablesEnumConfig.image,
|
|
177
180
|
enum_1.tablesEnumConfig.designation,
|
|
178
181
|
enum_1.tablesEnumConfig.name,
|
|
182
|
+
enum_1.tablesEnumConfig.workpieceParameters,
|
|
183
|
+
enum_1.tablesEnumConfig.material,
|
|
179
184
|
enum_1.tablesEnumConfig.startTime,
|
|
180
185
|
enum_1.tablesEnumConfig.calculatedCreateTime,
|
|
181
186
|
enum_1.tablesEnumConfig.calculateNeedsTime,
|