@molochko-dev/data 1.4.125 → 1.4.126
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.
|
@@ -40,23 +40,6 @@ class AnimalEventFilter {
|
|
|
40
40
|
fatnessFilter(animals) {
|
|
41
41
|
return animals;
|
|
42
42
|
}
|
|
43
|
-
// TODO удалить
|
|
44
|
-
osemenenieFilter(animals) {
|
|
45
|
-
const result = animals.filter((animal) => {
|
|
46
|
-
const genderOk = this.genderFilter(animal, enums_1.ANIMAL_GENDER_ENUM.cow);
|
|
47
|
-
const statusOk = this.statusFilter(animal, [
|
|
48
|
-
this.status.HEIFER,
|
|
49
|
-
this.status.BRED,
|
|
50
|
-
this.status.OPEN,
|
|
51
|
-
this.status.FRESH,
|
|
52
|
-
]);
|
|
53
|
-
const ageOk = this.ageFilter(animal, this.defaultCowAge);
|
|
54
|
-
if (genderOk && statusOk && ageOk) {
|
|
55
|
-
return animal;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
return result;
|
|
59
|
-
}
|
|
60
43
|
insemenationFilter(animals) {
|
|
61
44
|
const result = animals.filter((animal) => {
|
|
62
45
|
const genderOk = this.genderFilter(animal, enums_1.ANIMAL_GENDER_ENUM.cow);
|
|
@@ -73,18 +56,6 @@ class AnimalEventFilter {
|
|
|
73
56
|
});
|
|
74
57
|
return result;
|
|
75
58
|
}
|
|
76
|
-
// TODO удалить
|
|
77
|
-
otelFilter(animals) {
|
|
78
|
-
const result = animals.filter((animal) => {
|
|
79
|
-
const genderOk = this.genderFilter(animal, enums_1.ANIMAL_GENDER_ENUM.cow);
|
|
80
|
-
const statusOk = this.statusFilter(animal, [this.status.DRY, this.status.PREGNANT]);
|
|
81
|
-
const ageOk = this.ageFilter(animal, this.defaultCowAge);
|
|
82
|
-
if (genderOk && statusOk && ageOk) {
|
|
83
|
-
return animal;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
return result;
|
|
87
|
-
}
|
|
88
59
|
calvingFilter(animals) {
|
|
89
60
|
const result = animals.filter((animal) => {
|
|
90
61
|
const genderOk = this.genderFilter(animal, enums_1.ANIMAL_GENDER_ENUM.cow);
|
package/dist/event/enums.d.ts
CHANGED
package/dist/event/enums.js
CHANGED
|
@@ -116,4 +116,5 @@ var EVENT_TYPES_ENUM;
|
|
|
116
116
|
EVENT_TYPES_ENUM["sinchronizatsia"] = "sinchronizatsia";
|
|
117
117
|
EVENT_TYPES_ENUM["transferOut"] = "transferOut";
|
|
118
118
|
EVENT_TYPES_ENUM["treatment"] = "treatment";
|
|
119
|
+
EVENT_TYPES_ENUM["retagging"] = "retagging";
|
|
119
120
|
})(EVENT_TYPES_ENUM = exports.EVENT_TYPES_ENUM || (exports.EVENT_TYPES_ENUM = {}));
|
package/package.json
CHANGED
|
@@ -53,24 +53,6 @@ class AnimalEventFilter {
|
|
|
53
53
|
fatnessFilter<T extends BaseAnimal>(animals: T[]): T[] {
|
|
54
54
|
return animals;
|
|
55
55
|
}
|
|
56
|
-
// TODO удалить
|
|
57
|
-
osemenenieFilter<T extends BaseAnimal>(animals: T[]): T[] {
|
|
58
|
-
const result = animals.filter((animal) => {
|
|
59
|
-
const genderOk = this.genderFilter(animal, ANIMAL_GENDER_ENUM.cow);
|
|
60
|
-
const statusOk = this.statusFilter(animal, [
|
|
61
|
-
this.status.HEIFER,
|
|
62
|
-
this.status.BRED,
|
|
63
|
-
this.status.OPEN,
|
|
64
|
-
this.status.FRESH,
|
|
65
|
-
]);
|
|
66
|
-
const ageOk = this.ageFilter(animal, this.defaultCowAge);
|
|
67
|
-
if (genderOk && statusOk && ageOk) {
|
|
68
|
-
return animal;
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
56
|
|
|
75
57
|
insemenationFilter<T extends BaseAnimal>(animals: T[]): T[] {
|
|
76
58
|
const result = animals.filter((animal) => {
|
|
@@ -89,19 +71,6 @@ class AnimalEventFilter {
|
|
|
89
71
|
|
|
90
72
|
return result;
|
|
91
73
|
}
|
|
92
|
-
// TODO удалить
|
|
93
|
-
otelFilter<T extends BaseAnimal>(animals: T[]): T[] {
|
|
94
|
-
const result = animals.filter((animal) => {
|
|
95
|
-
const genderOk = this.genderFilter(animal, ANIMAL_GENDER_ENUM.cow);
|
|
96
|
-
const statusOk = this.statusFilter(animal, [this.status.DRY, this.status.PREGNANT]);
|
|
97
|
-
const ageOk = this.ageFilter(animal, this.defaultCowAge);
|
|
98
|
-
|
|
99
|
-
if (genderOk && statusOk && ageOk) {
|
|
100
|
-
return animal;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
74
|
|
|
106
75
|
calvingFilter<T extends BaseAnimal>(animals: T[]): T[] {
|
|
107
76
|
const result = animals.filter((animal) => {
|
package/src/event/enums.ts
CHANGED