@gesagro/jaspion-sdk 1.0.1 → 1.0.3
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/README.md +7 -0
- package/dist/index.d.mts +1319 -18
- package/dist/index.d.ts +1319 -18
- package/dist/index.js +2307 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2307 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -4
package/dist/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/index.ts
|
|
@@ -34,24 +24,58 @@ __export(index_exports, {
|
|
|
34
24
|
});
|
|
35
25
|
module.exports = __toCommonJS(index_exports);
|
|
36
26
|
|
|
37
|
-
// src/client.ts
|
|
38
|
-
var
|
|
27
|
+
// src/core/http-client.ts
|
|
28
|
+
var HttpClient = class {
|
|
29
|
+
constructor(baseUrl) {
|
|
30
|
+
this.baseUrl = baseUrl;
|
|
31
|
+
this.headers = {
|
|
32
|
+
"Content-Type": "application/json"
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
setHeader(key, value) {
|
|
36
|
+
this.headers[key] = value;
|
|
37
|
+
}
|
|
38
|
+
async post(path, body) {
|
|
39
|
+
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
40
|
+
method: "POST",
|
|
41
|
+
headers: this.headers,
|
|
42
|
+
body: JSON.stringify(body)
|
|
43
|
+
});
|
|
44
|
+
if (!response.ok) {
|
|
45
|
+
throw new Error(`Request failed with status ${response.status}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
39
49
|
|
|
40
50
|
// src/core/report.ts
|
|
41
51
|
var Report = class {
|
|
42
|
-
constructor(http
|
|
52
|
+
constructor(http) {
|
|
43
53
|
this.http = http;
|
|
44
|
-
|
|
54
|
+
}
|
|
55
|
+
async requestPdf(input) {
|
|
56
|
+
return this.request({
|
|
57
|
+
...input,
|
|
58
|
+
contentType: "application/pdf"
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async requestCsv(input) {
|
|
62
|
+
return this.request({
|
|
63
|
+
...input,
|
|
64
|
+
contentType: "text/csv"
|
|
65
|
+
});
|
|
45
66
|
}
|
|
46
67
|
async request({
|
|
47
68
|
contentType,
|
|
48
69
|
parameters,
|
|
49
70
|
resources
|
|
50
71
|
}) {
|
|
51
|
-
const
|
|
52
|
-
|
|
72
|
+
const fileExtensions = {
|
|
73
|
+
"application/pdf": ".pdf",
|
|
74
|
+
"text/csv": ".csv"
|
|
75
|
+
};
|
|
76
|
+
const fileName = `${this.fileName}${fileExtensions[contentType]}`;
|
|
53
77
|
await this.http.post("/reports", {
|
|
54
|
-
template: this.
|
|
78
|
+
template: this.template,
|
|
55
79
|
fileName,
|
|
56
80
|
parameters,
|
|
57
81
|
resources,
|
|
@@ -61,40 +85,2287 @@ var Report = class {
|
|
|
61
85
|
}
|
|
62
86
|
};
|
|
63
87
|
|
|
64
|
-
// src/namespaces/pig-master/reports/
|
|
65
|
-
var
|
|
66
|
-
constructor(
|
|
67
|
-
super(
|
|
68
|
-
|
|
69
|
-
|
|
88
|
+
// src/namespaces/pig-master/reports/birth-place-list.ts
|
|
89
|
+
var BirthPlaceList = class extends Report {
|
|
90
|
+
constructor() {
|
|
91
|
+
super(...arguments);
|
|
92
|
+
this.template = "@pig-master/birth-place-list";
|
|
93
|
+
this.fileName = "Listagem de proced\xEAncias";
|
|
94
|
+
}
|
|
95
|
+
async pdf(input) {
|
|
96
|
+
return this.requestPdf({
|
|
97
|
+
resources: this.getResources(input),
|
|
98
|
+
parameters: [
|
|
99
|
+
...this.getParameters(input),
|
|
100
|
+
{ key: "DATA_ONLY", value: false }
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
async csv(input) {
|
|
105
|
+
return this.requestCsv({
|
|
106
|
+
resources: this.getResources(input),
|
|
107
|
+
parameters: [
|
|
108
|
+
...this.getParameters(input),
|
|
109
|
+
{ key: "DATA_ONLY", value: true }
|
|
110
|
+
]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
getResources(input) {
|
|
114
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
115
|
+
}
|
|
116
|
+
getParameters(input) {
|
|
117
|
+
return [{ key: "LOCATE", value: input.language.replace("-", "_") }];
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// src/namespaces/pig-master/reports/boar-by-breed-list.ts
|
|
122
|
+
var BoarByBreedList = class extends Report {
|
|
123
|
+
constructor() {
|
|
124
|
+
super(...arguments);
|
|
125
|
+
this.template = "@pig-master/boar-by-breed-list";
|
|
126
|
+
this.fileName = "Machos por ra\xE7a";
|
|
127
|
+
}
|
|
128
|
+
async pdf(input) {
|
|
129
|
+
return this.requestPdf({
|
|
130
|
+
resources: this.getResources(input),
|
|
131
|
+
parameters: [
|
|
132
|
+
...this.getParameters(input),
|
|
133
|
+
{ key: "DATA_ONLY", value: false }
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
async csv(input) {
|
|
138
|
+
return this.requestCsv({
|
|
139
|
+
resources: this.getResources(input),
|
|
140
|
+
parameters: [
|
|
141
|
+
...this.getParameters(input),
|
|
142
|
+
{ key: "DATA_ONLY", value: true }
|
|
143
|
+
]
|
|
70
144
|
});
|
|
71
145
|
}
|
|
146
|
+
getResources(input) {
|
|
147
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
148
|
+
}
|
|
149
|
+
getParameters(input) {
|
|
150
|
+
return [
|
|
151
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
152
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
153
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
154
|
+
];
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// src/namespaces/pig-master/reports/boar-death-collection-form.ts
|
|
159
|
+
var BoarDeathCollectionForm = class extends Report {
|
|
160
|
+
constructor() {
|
|
161
|
+
super(...arguments);
|
|
162
|
+
this.template = "@pig-master/boar-death-collection-form";
|
|
163
|
+
this.fileName = "Morte de macho";
|
|
164
|
+
}
|
|
72
165
|
async pdf(input) {
|
|
73
|
-
return
|
|
74
|
-
contentType: "application/pdf",
|
|
166
|
+
return this.requestPdf({
|
|
75
167
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
168
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
// src/namespaces/pig-master/reports/boar-death-list.ts
|
|
174
|
+
var BoarDeathList = class extends Report {
|
|
175
|
+
constructor() {
|
|
176
|
+
super(...arguments);
|
|
177
|
+
this.template = "@pig-master/boar-death-list";
|
|
178
|
+
this.fileName = "Mortes de machos";
|
|
179
|
+
}
|
|
180
|
+
async pdf(input) {
|
|
181
|
+
return this.requestPdf({
|
|
182
|
+
resources: this.getResources(input),
|
|
76
183
|
parameters: [
|
|
77
|
-
|
|
78
|
-
{ key: "
|
|
184
|
+
...this.getParameters(input),
|
|
185
|
+
{ key: "DATA_ONLY", value: false }
|
|
186
|
+
]
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
async csv(input) {
|
|
190
|
+
return this.requestCsv({
|
|
191
|
+
resources: this.getResources(input),
|
|
192
|
+
parameters: [
|
|
193
|
+
...this.getParameters(input),
|
|
194
|
+
{ key: "DATA_ONLY", value: true }
|
|
195
|
+
]
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
getResources(input) {
|
|
199
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
200
|
+
}
|
|
201
|
+
getParameters(input) {
|
|
202
|
+
return [
|
|
203
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
204
|
+
{ key: "CAUSE_ID", value: input.causeId },
|
|
205
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
206
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
207
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
208
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
209
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
210
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
211
|
+
{
|
|
212
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
213
|
+
value: input.arrivalDateRange?.start ?? null
|
|
214
|
+
},
|
|
215
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null }
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
// src/namespaces/pig-master/reports/boar-discard-collection-form.ts
|
|
221
|
+
var BoarDiscardCollectionForm = class extends Report {
|
|
222
|
+
constructor() {
|
|
223
|
+
super(...arguments);
|
|
224
|
+
this.template = "@pig-master/boar-discard-collection-form";
|
|
225
|
+
this.fileName = "Descarte de macho";
|
|
226
|
+
}
|
|
227
|
+
async pdf(input) {
|
|
228
|
+
return this.requestPdf({
|
|
229
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
230
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
// src/namespaces/pig-master/reports/boar-discard-list.ts
|
|
236
|
+
var BoarDiscardList = class extends Report {
|
|
237
|
+
constructor() {
|
|
238
|
+
super(...arguments);
|
|
239
|
+
this.template = "@pig-master/boar-discard-list";
|
|
240
|
+
this.fileName = "Descartes de machos";
|
|
241
|
+
}
|
|
242
|
+
async pdf(input) {
|
|
243
|
+
return this.requestPdf({
|
|
244
|
+
resources: this.getResources(input),
|
|
245
|
+
parameters: [
|
|
246
|
+
...this.getParameters(input),
|
|
247
|
+
{ key: "DATA_ONLY", value: false }
|
|
248
|
+
]
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
async csv(input) {
|
|
252
|
+
return this.requestCsv({
|
|
253
|
+
resources: this.getResources(input),
|
|
254
|
+
parameters: [
|
|
255
|
+
...this.getParameters(input),
|
|
256
|
+
{ key: "DATA_ONLY", value: true }
|
|
257
|
+
]
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
getResources(input) {
|
|
261
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
262
|
+
}
|
|
263
|
+
getParameters(input) {
|
|
264
|
+
return [
|
|
265
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
266
|
+
{ key: "CAUSE_ID", value: input.causeId },
|
|
267
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
268
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
269
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
270
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
271
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
272
|
+
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
273
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
274
|
+
{
|
|
275
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
276
|
+
value: input.arrivalDateRange?.start ?? null
|
|
277
|
+
},
|
|
278
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null }
|
|
279
|
+
];
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
// src/namespaces/pig-master/reports/boar-ear-tag-replacement-list.ts
|
|
284
|
+
var BoarEarTagReplacementList = class extends Report {
|
|
285
|
+
constructor() {
|
|
286
|
+
super(...arguments);
|
|
287
|
+
this.template = "@pig-master/boar-ear-tag-replacement-list";
|
|
288
|
+
this.fileName = "Trocas de brinco de macho";
|
|
289
|
+
}
|
|
290
|
+
async pdf(input) {
|
|
291
|
+
return this.requestPdf({
|
|
292
|
+
resources: this.getResources(input),
|
|
293
|
+
parameters: [
|
|
294
|
+
...this.getParameters(input),
|
|
295
|
+
{ key: "DATA_ONLY", value: false }
|
|
79
296
|
]
|
|
80
297
|
});
|
|
81
298
|
}
|
|
82
299
|
async csv(input) {
|
|
83
|
-
return
|
|
84
|
-
|
|
300
|
+
return this.requestCsv({
|
|
301
|
+
resources: this.getResources(input),
|
|
302
|
+
parameters: [
|
|
303
|
+
...this.getParameters(input),
|
|
304
|
+
{ key: "DATA_ONLY", value: true }
|
|
305
|
+
]
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
getResources(input) {
|
|
309
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
310
|
+
}
|
|
311
|
+
getParameters(input) {
|
|
312
|
+
return [
|
|
313
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
314
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
315
|
+
{ key: "OLD_EAR_TAG", value: input.oldEarTag },
|
|
316
|
+
{ key: "NEW_EAR_TAG", value: input.newEarTag },
|
|
317
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
318
|
+
];
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
// src/namespaces/pig-master/reports/boar-treatment-collection-form.ts
|
|
323
|
+
var BoarTreatmentCollectionForm = class extends Report {
|
|
324
|
+
constructor() {
|
|
325
|
+
super(...arguments);
|
|
326
|
+
this.template = "@pig-master/boar-treatment-collection-form";
|
|
327
|
+
this.fileName = "Medica\xE7\xE3o / vacina\xE7\xE3o de macho";
|
|
328
|
+
}
|
|
329
|
+
async pdf(input) {
|
|
330
|
+
return this.requestPdf({
|
|
85
331
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
332
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
// src/namespaces/pig-master/reports/boar-treatment-list.ts
|
|
338
|
+
var BoarTreatmentList = class extends Report {
|
|
339
|
+
constructor() {
|
|
340
|
+
super(...arguments);
|
|
341
|
+
this.template = "@pig-master/boar-treatment-list";
|
|
342
|
+
this.fileName = "Listagem de medica\xE7\xF5es / vacinas (machos)";
|
|
343
|
+
}
|
|
344
|
+
async pdf(input) {
|
|
345
|
+
return this.requestPdf({
|
|
346
|
+
resources: this.getResources(input),
|
|
86
347
|
parameters: [
|
|
87
|
-
|
|
88
|
-
{ key: "
|
|
348
|
+
...this.getParameters(input),
|
|
349
|
+
{ key: "DATA_ONLY", value: false }
|
|
350
|
+
]
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
async csv(input) {
|
|
354
|
+
return this.requestCsv({
|
|
355
|
+
resources: this.getResources(input),
|
|
356
|
+
parameters: [
|
|
357
|
+
...this.getParameters(input),
|
|
358
|
+
{ key: "DATA_ONLY", value: true }
|
|
359
|
+
]
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
getResources(input) {
|
|
363
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
364
|
+
}
|
|
365
|
+
getParameters(input) {
|
|
366
|
+
return [
|
|
367
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
368
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
369
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
370
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
371
|
+
{ key: "BOAR_ID", value: input.boarId }
|
|
372
|
+
];
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
// src/namespaces/pig-master/reports/boars-inventory.ts
|
|
377
|
+
var BoarsInventory = class extends Report {
|
|
378
|
+
constructor() {
|
|
379
|
+
super(...arguments);
|
|
380
|
+
this.template = "@pig-master/boars-inventory";
|
|
381
|
+
this.fileName = "Estoque de machos";
|
|
382
|
+
}
|
|
383
|
+
async pdf(input) {
|
|
384
|
+
return this.requestPdf({
|
|
385
|
+
resources: this.getResources(input),
|
|
386
|
+
parameters: [
|
|
387
|
+
...this.getParameters(input),
|
|
388
|
+
{ key: "DATA_ONLY", value: false }
|
|
389
|
+
]
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
async csv(input) {
|
|
393
|
+
return this.requestCsv({
|
|
394
|
+
resources: this.getResources(input),
|
|
395
|
+
parameters: [
|
|
396
|
+
...this.getParameters(input),
|
|
397
|
+
{ key: "DATA_ONLY", value: true }
|
|
398
|
+
]
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
getResources(input) {
|
|
402
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
403
|
+
}
|
|
404
|
+
getParameters(input) {
|
|
405
|
+
return [
|
|
406
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
407
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
408
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
409
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
410
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
411
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId }
|
|
412
|
+
];
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
// src/namespaces/pig-master/reports/breed-list.ts
|
|
417
|
+
var BreedList = class extends Report {
|
|
418
|
+
constructor() {
|
|
419
|
+
super(...arguments);
|
|
420
|
+
this.template = "@pig-master/breed-list";
|
|
421
|
+
this.fileName = "Listagem de ra\xE7as";
|
|
422
|
+
}
|
|
423
|
+
async pdf(input) {
|
|
424
|
+
return this.requestPdf({
|
|
425
|
+
resources: this.getResources(input),
|
|
426
|
+
parameters: [
|
|
427
|
+
...this.getParameters(input),
|
|
428
|
+
{ key: "DATA_ONLY", value: false }
|
|
429
|
+
]
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
async csv(input) {
|
|
433
|
+
return this.requestCsv({
|
|
434
|
+
resources: this.getResources(input),
|
|
435
|
+
parameters: [
|
|
436
|
+
...this.getParameters(input),
|
|
437
|
+
{ key: "DATA_ONLY", value: true }
|
|
438
|
+
]
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
getResources(input) {
|
|
442
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
443
|
+
}
|
|
444
|
+
getParameters(input) {
|
|
445
|
+
return [{ key: "LOCATE", value: input.language.replace("-", "_") }];
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
// src/namespaces/pig-master/reports/breeding-monitor.ts
|
|
450
|
+
var BreedingMonitor = class extends Report {
|
|
451
|
+
constructor() {
|
|
452
|
+
super(...arguments);
|
|
453
|
+
this.template = "@pig-master/breeding-monitor";
|
|
454
|
+
this.fileName = "Monitor de Reprodu\xE7\xE3o";
|
|
455
|
+
}
|
|
456
|
+
async pdf(input) {
|
|
457
|
+
return this.requestPdf({
|
|
458
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
459
|
+
parameters: [
|
|
460
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
461
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
462
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
463
|
+
{ key: "DATA_ONLY", value: false }
|
|
464
|
+
]
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
// src/namespaces/pig-master/reports/cause-list.ts
|
|
470
|
+
var CauseList = class extends Report {
|
|
471
|
+
constructor() {
|
|
472
|
+
super(...arguments);
|
|
473
|
+
this.template = "@pig-master/cause-list";
|
|
474
|
+
this.fileName = "Listagem de motivos";
|
|
475
|
+
}
|
|
476
|
+
async pdf(input) {
|
|
477
|
+
return this.requestPdf({
|
|
478
|
+
resources: this.getResources(input),
|
|
479
|
+
parameters: [
|
|
480
|
+
...this.getParameters(input),
|
|
481
|
+
{ key: "DATA_ONLY", value: false }
|
|
482
|
+
]
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
async csv(input) {
|
|
486
|
+
return this.requestCsv({
|
|
487
|
+
resources: this.getResources(input),
|
|
488
|
+
parameters: [
|
|
489
|
+
...this.getParameters(input),
|
|
490
|
+
{ key: "DATA_ONLY", value: true }
|
|
491
|
+
]
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
getResources(input) {
|
|
495
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
496
|
+
}
|
|
497
|
+
getParameters(input) {
|
|
498
|
+
return [
|
|
499
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
500
|
+
{ key: "ORDERBYCOLUMN", value: input.orderBy.column },
|
|
501
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction },
|
|
502
|
+
{ key: "DESCRIPTION", value: input.description },
|
|
503
|
+
{ key: "AVAILABILITY", value: input.availability }
|
|
504
|
+
];
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
// src/namespaces/pig-master/reports/drug-list.ts
|
|
509
|
+
var DrugList = class extends Report {
|
|
510
|
+
constructor() {
|
|
511
|
+
super(...arguments);
|
|
512
|
+
this.template = "@pig-master/drug-list";
|
|
513
|
+
this.fileName = "Listagem de medicamentos / vacinas";
|
|
514
|
+
}
|
|
515
|
+
async pdf(input) {
|
|
516
|
+
return this.requestPdf({
|
|
517
|
+
resources: this.getResources(input),
|
|
518
|
+
parameters: [
|
|
519
|
+
...this.getParameters(input),
|
|
520
|
+
{ key: "DATA_ONLY", value: false }
|
|
521
|
+
]
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
async csv(input) {
|
|
525
|
+
return this.requestCsv({
|
|
526
|
+
resources: this.getResources(input),
|
|
527
|
+
parameters: [
|
|
528
|
+
...this.getParameters(input),
|
|
529
|
+
{ key: "DATA_ONLY", value: true }
|
|
530
|
+
]
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
getResources(input) {
|
|
534
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
535
|
+
}
|
|
536
|
+
getParameters(input) {
|
|
537
|
+
return [{ key: "LOCATE", value: input.language.replace("-", "_") }];
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
// src/namespaces/pig-master/reports/employee-list.ts
|
|
542
|
+
var EmployeeList = class extends Report {
|
|
543
|
+
constructor() {
|
|
544
|
+
super(...arguments);
|
|
545
|
+
this.template = "@pig-master/employee-list";
|
|
546
|
+
this.fileName = "Listagem de funcion\xE1rios";
|
|
547
|
+
}
|
|
548
|
+
async pdf(input) {
|
|
549
|
+
return this.requestPdf({
|
|
550
|
+
resources: this.getResources(input),
|
|
551
|
+
parameters: [
|
|
552
|
+
...this.getParameters(input),
|
|
553
|
+
{ key: "DATA_ONLY", value: false }
|
|
554
|
+
]
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
async csv(input) {
|
|
558
|
+
return this.requestCsv({
|
|
559
|
+
resources: this.getResources(input),
|
|
560
|
+
parameters: [
|
|
561
|
+
...this.getParameters(input),
|
|
562
|
+
{ key: "DATA_ONLY", value: true }
|
|
563
|
+
]
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
getResources(input) {
|
|
567
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
568
|
+
}
|
|
569
|
+
getParameters(input) {
|
|
570
|
+
return [
|
|
571
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
572
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
573
|
+
];
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
// src/namespaces/pig-master/reports/farm-summary.ts
|
|
578
|
+
var FarmSummary = class extends Report {
|
|
579
|
+
constructor() {
|
|
580
|
+
super(...arguments);
|
|
581
|
+
this.template = "@pig-master/farm-summary";
|
|
582
|
+
this.fileName = "Fechamento de per\xEDodo";
|
|
583
|
+
}
|
|
584
|
+
async pdf(input) {
|
|
585
|
+
return this.requestPdf({
|
|
586
|
+
resources: this.getResources(input),
|
|
587
|
+
parameters: [
|
|
588
|
+
...this.getParameters(input),
|
|
589
|
+
{ key: "DATA_ONLY", value: false }
|
|
590
|
+
]
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
async csv(input) {
|
|
594
|
+
return this.requestCsv({
|
|
595
|
+
resources: this.getResources(input),
|
|
596
|
+
parameters: [
|
|
597
|
+
...this.getParameters(input),
|
|
598
|
+
{ key: "DATA_ONLY", value: true }
|
|
599
|
+
]
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
getResources(input) {
|
|
603
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
604
|
+
}
|
|
605
|
+
getParameters(input) {
|
|
606
|
+
return [
|
|
607
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
608
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
609
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
610
|
+
];
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
// src/namespaces/pig-master/reports/farrowing-analysis.ts
|
|
615
|
+
var FarrowingAnalysis = class extends Report {
|
|
616
|
+
constructor() {
|
|
617
|
+
super(...arguments);
|
|
618
|
+
this.template = "@pig-master/farrowing-analysis";
|
|
619
|
+
this.fileName = "An\xE1lise de partos";
|
|
620
|
+
}
|
|
621
|
+
async pdf(input) {
|
|
622
|
+
return this.requestPdf({
|
|
623
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
624
|
+
parameters: [
|
|
625
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
626
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
627
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
628
|
+
{ key: "GROUP", value: input.groupBy },
|
|
629
|
+
{ key: "FIELD", value: input.emphasis },
|
|
630
|
+
{ key: "PARITY", value: input.parity },
|
|
631
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
632
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
633
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
634
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
635
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
636
|
+
{
|
|
637
|
+
key: "MATING_DATE_BEGIN",
|
|
638
|
+
value: input.matingDateRange?.start ?? null
|
|
639
|
+
},
|
|
640
|
+
{ key: "MATING_DATE_END", value: input.matingDateRange?.end ?? null }
|
|
641
|
+
]
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
// src/namespaces/pig-master/reports/farrowing-collection-form.ts
|
|
647
|
+
var FarrowingCollectionForm = class extends Report {
|
|
648
|
+
constructor() {
|
|
649
|
+
super(...arguments);
|
|
650
|
+
this.template = "@pig-master/farrowing-collection-form";
|
|
651
|
+
this.fileName = "Parto";
|
|
652
|
+
}
|
|
653
|
+
async pdf(input) {
|
|
654
|
+
return this.requestPdf({
|
|
655
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
656
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
// src/namespaces/pig-master/reports/farrowing-type-list.ts
|
|
662
|
+
var FarrowingTypeList = class extends Report {
|
|
663
|
+
constructor() {
|
|
664
|
+
super(...arguments);
|
|
665
|
+
this.template = "@pig-master/farrowing-type-list";
|
|
666
|
+
this.fileName = "Listagem de tipos de parto";
|
|
667
|
+
}
|
|
668
|
+
async pdf(input) {
|
|
669
|
+
return this.requestPdf({
|
|
670
|
+
resources: this.getResources(input),
|
|
671
|
+
parameters: [
|
|
672
|
+
...this.getParameters(input),
|
|
673
|
+
{ key: "DATA_ONLY", value: false }
|
|
674
|
+
]
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
async csv(input) {
|
|
678
|
+
return this.requestCsv({
|
|
679
|
+
resources: this.getResources(input),
|
|
680
|
+
parameters: [
|
|
681
|
+
...this.getParameters(input),
|
|
682
|
+
{ key: "DATA_ONLY", value: true }
|
|
683
|
+
]
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
getResources(input) {
|
|
687
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
688
|
+
}
|
|
689
|
+
getParameters(input) {
|
|
690
|
+
return [{ key: "LOCATE", value: input.language.replace("-", "_") }];
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
// src/namespaces/pig-master/reports/female-swine-arrival-monitoring.ts
|
|
695
|
+
var FemaleSwineArrivalMonitoring = class extends Report {
|
|
696
|
+
constructor() {
|
|
697
|
+
super(...arguments);
|
|
698
|
+
this.template = "@pig-master/female-swine-arrival-monitoring";
|
|
699
|
+
this.fileName = "Acompanhamento do lote";
|
|
700
|
+
}
|
|
701
|
+
async pdf(input) {
|
|
702
|
+
return this.requestPdf({
|
|
703
|
+
resources: this.getResources(input),
|
|
704
|
+
parameters: [
|
|
705
|
+
...this.getParameters(input),
|
|
706
|
+
{ key: "DATA_ONLY", value: false }
|
|
707
|
+
]
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
async csv(input) {
|
|
711
|
+
return this.requestCsv({
|
|
712
|
+
resources: this.getResources(input),
|
|
713
|
+
parameters: [
|
|
714
|
+
...this.getParameters(input),
|
|
715
|
+
{ key: "DATA_ONLY", value: true }
|
|
89
716
|
]
|
|
90
717
|
});
|
|
91
718
|
}
|
|
719
|
+
getResources(input) {
|
|
720
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
721
|
+
}
|
|
722
|
+
getParameters(input) {
|
|
723
|
+
return [
|
|
724
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
725
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
726
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
727
|
+
{ key: "PAGE", value: input.pagination.page },
|
|
728
|
+
{ key: "PER_PAGE", value: input.pagination.perPage },
|
|
729
|
+
{ key: "ORIGIN_ID", value: input.originId }
|
|
730
|
+
];
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
// src/namespaces/pig-master/reports/female-swine-by-breed-list.ts
|
|
735
|
+
var FemaleSwineByBreedList = class extends Report {
|
|
736
|
+
constructor() {
|
|
737
|
+
super(...arguments);
|
|
738
|
+
this.template = "@pig-master/female-swine-by-breed-list";
|
|
739
|
+
this.fileName = "F\xEAmeas por ra\xE7a";
|
|
740
|
+
}
|
|
741
|
+
async pdf(input) {
|
|
742
|
+
return this.requestPdf({
|
|
743
|
+
resources: this.getResources(input),
|
|
744
|
+
parameters: [
|
|
745
|
+
...this.getParameters(input),
|
|
746
|
+
{ key: "DATA_ONLY", value: false }
|
|
747
|
+
]
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
async csv(input) {
|
|
751
|
+
return this.requestCsv({
|
|
752
|
+
resources: this.getResources(input),
|
|
753
|
+
parameters: [
|
|
754
|
+
...this.getParameters(input),
|
|
755
|
+
{ key: "DATA_ONLY", value: true }
|
|
756
|
+
]
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
getResources(input) {
|
|
760
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
761
|
+
}
|
|
762
|
+
getParameters(input) {
|
|
763
|
+
return [
|
|
764
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
765
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
766
|
+
{
|
|
767
|
+
key: "REMOVE_GILT_SOW",
|
|
768
|
+
value: input.productivityStatus === "productive"
|
|
769
|
+
},
|
|
770
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
771
|
+
];
|
|
772
|
+
}
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
// src/namespaces/pig-master/reports/female-swine-by-parity-list.ts
|
|
776
|
+
var FemaleSwineByParityList = class extends Report {
|
|
777
|
+
constructor() {
|
|
778
|
+
super(...arguments);
|
|
779
|
+
this.template = "@pig-master/female-swine-by-parity-list";
|
|
780
|
+
this.fileName = "F\xEAmeas por cria";
|
|
781
|
+
}
|
|
782
|
+
async pdf(input) {
|
|
783
|
+
return this.requestPdf({
|
|
784
|
+
resources: this.getResources(input),
|
|
785
|
+
parameters: [
|
|
786
|
+
...this.getParameters(input),
|
|
787
|
+
{ key: "DATA_ONLY", value: false }
|
|
788
|
+
]
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
async csv(input) {
|
|
792
|
+
return this.requestCsv({
|
|
793
|
+
resources: this.getResources(input),
|
|
794
|
+
parameters: [
|
|
795
|
+
...this.getParameters(input),
|
|
796
|
+
{ key: "DATA_ONLY", value: true }
|
|
797
|
+
]
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
getResources(input) {
|
|
801
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
802
|
+
}
|
|
803
|
+
getParameters(input) {
|
|
804
|
+
return [
|
|
805
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
806
|
+
{ key: "PARITY", value: input.parity },
|
|
807
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
808
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
809
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
810
|
+
{ key: "STATUS", value: input.status },
|
|
811
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
812
|
+
];
|
|
813
|
+
}
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
// src/namespaces/pig-master/reports/female-swine-by-status-list.ts
|
|
817
|
+
var FemaleSwineByStatusList = class extends Report {
|
|
818
|
+
constructor() {
|
|
819
|
+
super(...arguments);
|
|
820
|
+
this.template = "@pig-master/female-swine-by-status-list";
|
|
821
|
+
this.fileName = "F\xEAmeas por status";
|
|
822
|
+
}
|
|
823
|
+
async pdf(input) {
|
|
824
|
+
return this.requestPdf({
|
|
825
|
+
resources: this.getResources(input),
|
|
826
|
+
parameters: [
|
|
827
|
+
...this.getParameters(input),
|
|
828
|
+
{ key: "DATA_ONLY", value: false }
|
|
829
|
+
]
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
async csv(input) {
|
|
833
|
+
return this.requestCsv({
|
|
834
|
+
resources: this.getResources(input),
|
|
835
|
+
parameters: [
|
|
836
|
+
...this.getParameters(input),
|
|
837
|
+
{ key: "DATA_ONLY", value: true }
|
|
838
|
+
]
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
getResources(input) {
|
|
842
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
843
|
+
}
|
|
844
|
+
getParameters(input) {
|
|
845
|
+
return [
|
|
846
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
847
|
+
{ key: "STATUS", value: input.status },
|
|
848
|
+
{
|
|
849
|
+
key: "DAYSTODAY_BEGIN",
|
|
850
|
+
value: input.gestationLengthRange?.start ?? null
|
|
851
|
+
},
|
|
852
|
+
{ key: "DAYSTODAY_END", value: input.gestationLengthRange?.end ?? null },
|
|
853
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
854
|
+
{
|
|
855
|
+
key: "LAST_EVENT_DATE_BEGIN",
|
|
856
|
+
value: input.lastEventDateRange?.start ?? null
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
key: "LAST_EVENT_DATE_END",
|
|
860
|
+
value: input.lastEventDateRange?.end ?? null
|
|
861
|
+
},
|
|
862
|
+
{ key: "PARITY", value: input.parity },
|
|
863
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
864
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
865
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
866
|
+
{ key: "LIFECYCLE_STATUS", value: input.lifecycleStatus },
|
|
867
|
+
{
|
|
868
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
869
|
+
value: input.arrivalDateRange?.start ?? null
|
|
870
|
+
},
|
|
871
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null },
|
|
872
|
+
{ key: "ORDERBYCOLUMN", value: input.orderBy.column },
|
|
873
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction }
|
|
874
|
+
];
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
// src/namespaces/pig-master/reports/female-swine-by-traceability-list.ts
|
|
879
|
+
var FemaleSwineByTraceabilityList = class extends Report {
|
|
880
|
+
constructor() {
|
|
881
|
+
super(...arguments);
|
|
882
|
+
this.template = "@pig-master/female-swine-by-traceability-list";
|
|
883
|
+
this.fileName = "F\xEAmeas por rastreabilidade";
|
|
884
|
+
}
|
|
885
|
+
async pdf(input) {
|
|
886
|
+
return this.requestPdf({
|
|
887
|
+
resources: this.getResources(input),
|
|
888
|
+
parameters: [
|
|
889
|
+
...this.getParameters(input),
|
|
890
|
+
{ key: "DATA_ONLY", value: false }
|
|
891
|
+
]
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
async csv(input) {
|
|
895
|
+
return this.requestCsv({
|
|
896
|
+
resources: this.getResources(input),
|
|
897
|
+
parameters: [
|
|
898
|
+
...this.getParameters(input),
|
|
899
|
+
{ key: "DATA_ONLY", value: true }
|
|
900
|
+
]
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
getResources(input) {
|
|
904
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
905
|
+
}
|
|
906
|
+
getParameters(input) {
|
|
907
|
+
return [
|
|
908
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
909
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
910
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
911
|
+
{ key: "GTA_ID", value: input.gtaId },
|
|
912
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
913
|
+
{
|
|
914
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
915
|
+
value: input.arrivalDateRange?.start ?? null
|
|
916
|
+
},
|
|
917
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null },
|
|
918
|
+
{ key: "LIFECYCLE_STATUS", value: input.lifecycleStatus }
|
|
919
|
+
];
|
|
920
|
+
}
|
|
921
|
+
};
|
|
922
|
+
|
|
923
|
+
// src/namespaces/pig-master/reports/female-swine-death-analysis.ts
|
|
924
|
+
var FemaleSwineDeathAnalysis = class extends Report {
|
|
925
|
+
constructor() {
|
|
926
|
+
super(...arguments);
|
|
927
|
+
this.template = "@pig-master/female-swine-death-analysis";
|
|
928
|
+
this.fileName = "An\xE1lise morte de f\xEAmeas";
|
|
929
|
+
}
|
|
930
|
+
async pdf(input) {
|
|
931
|
+
return this.requestPdf({
|
|
932
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
933
|
+
parameters: [
|
|
934
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
935
|
+
{ key: "GROUPED_DESCRIPTION", value: input.groupBy },
|
|
936
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
937
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
938
|
+
{ key: "CAUSE_ID", value: input.causeId },
|
|
939
|
+
{ key: "PARITY", value: input.parity },
|
|
940
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
941
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
942
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
943
|
+
{ key: "STATUS", value: input.status },
|
|
944
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
945
|
+
{
|
|
946
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
947
|
+
value: input.arrivalDateRange?.start ?? null
|
|
948
|
+
},
|
|
949
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null }
|
|
950
|
+
]
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
// src/namespaces/pig-master/reports/female-swine-death-collection-form.ts
|
|
956
|
+
var FemaleSwineDeathCollectionForm = class extends Report {
|
|
957
|
+
constructor() {
|
|
958
|
+
super(...arguments);
|
|
959
|
+
this.template = "@pig-master/female-swine-death-collection-form";
|
|
960
|
+
this.fileName = "Morte de f\xEAmea";
|
|
961
|
+
}
|
|
962
|
+
async pdf(input) {
|
|
963
|
+
return this.requestPdf({
|
|
964
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
965
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
// src/namespaces/pig-master/reports/female-swine-death-list.ts
|
|
971
|
+
var FemaleSwineDeathList = class extends Report {
|
|
972
|
+
constructor() {
|
|
973
|
+
super(...arguments);
|
|
974
|
+
this.template = "@pig-master/female-swine-death-list";
|
|
975
|
+
this.fileName = "Morte de f\xEAmeas";
|
|
976
|
+
}
|
|
977
|
+
async pdf(input) {
|
|
978
|
+
return this.requestPdf({
|
|
979
|
+
resources: this.getResources(input),
|
|
980
|
+
parameters: [
|
|
981
|
+
...this.getParameters(input),
|
|
982
|
+
{ key: "DATA_ONLY", value: false }
|
|
983
|
+
]
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
async csv(input) {
|
|
987
|
+
return this.requestCsv({
|
|
988
|
+
resources: this.getResources(input),
|
|
989
|
+
parameters: [
|
|
990
|
+
...this.getParameters(input),
|
|
991
|
+
{ key: "DATA_ONLY", value: true }
|
|
992
|
+
]
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
getResources(input) {
|
|
996
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
997
|
+
}
|
|
998
|
+
getParameters(input) {
|
|
999
|
+
return [
|
|
1000
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1001
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1002
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1003
|
+
{ key: "CAUSE_ID", value: input.causeId },
|
|
1004
|
+
{ key: "PARITY", value: input.parity },
|
|
1005
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1006
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1007
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
1008
|
+
{ key: "STATUS", value: input.status },
|
|
1009
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1010
|
+
{
|
|
1011
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
1012
|
+
value: input.arrivalDateRange?.start ?? null
|
|
1013
|
+
},
|
|
1014
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null }
|
|
1015
|
+
];
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1019
|
+
// src/namespaces/pig-master/reports/female-swine-discard-analysis.ts
|
|
1020
|
+
var FemaleSwineDiscardAnalysis = class extends Report {
|
|
1021
|
+
constructor() {
|
|
1022
|
+
super(...arguments);
|
|
1023
|
+
this.template = "@pig-master/female-swine-discard-analysis";
|
|
1024
|
+
this.fileName = "An\xE1lise descarte de f\xEAmeas";
|
|
1025
|
+
}
|
|
1026
|
+
async pdf(input) {
|
|
1027
|
+
return this.requestPdf({
|
|
1028
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1029
|
+
parameters: [
|
|
1030
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1031
|
+
{ key: "GROUPED_DESCRIPTION", value: input.groupBy },
|
|
1032
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1033
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1034
|
+
{ key: "CAUSE_ID", value: input.causeId },
|
|
1035
|
+
{ key: "PARITY", value: input.parity },
|
|
1036
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1037
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1038
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
1039
|
+
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
1040
|
+
{ key: "STATUS", value: input.status },
|
|
1041
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1042
|
+
{
|
|
1043
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
1044
|
+
value: input.arrivalDateRange?.start ?? null
|
|
1045
|
+
},
|
|
1046
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null }
|
|
1047
|
+
]
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
};
|
|
1051
|
+
|
|
1052
|
+
// src/namespaces/pig-master/reports/female-swine-discard-collection-form.ts
|
|
1053
|
+
var FemaleSwineDiscardCollectionForm = class extends Report {
|
|
1054
|
+
constructor() {
|
|
1055
|
+
super(...arguments);
|
|
1056
|
+
this.template = "@pig-master/female-swine-discard-collection-form";
|
|
1057
|
+
this.fileName = "Descarte de f\xEAmea";
|
|
1058
|
+
}
|
|
1059
|
+
async pdf(input) {
|
|
1060
|
+
return this.requestPdf({
|
|
1061
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1062
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
// src/namespaces/pig-master/reports/female-swine-discard-list.ts
|
|
1068
|
+
var FemaleSwineDiscardList = class extends Report {
|
|
1069
|
+
constructor() {
|
|
1070
|
+
super(...arguments);
|
|
1071
|
+
this.template = "@pig-master/female-swine-discard-list";
|
|
1072
|
+
this.fileName = "Descarte de f\xEAmeas";
|
|
1073
|
+
}
|
|
1074
|
+
async pdf(input) {
|
|
1075
|
+
return this.requestPdf({
|
|
1076
|
+
resources: this.getResources(input),
|
|
1077
|
+
parameters: [
|
|
1078
|
+
...this.getParameters(input),
|
|
1079
|
+
{ key: "DATA_ONLY", value: false }
|
|
1080
|
+
]
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
async csv(input) {
|
|
1084
|
+
return this.requestCsv({
|
|
1085
|
+
resources: this.getResources(input),
|
|
1086
|
+
parameters: [
|
|
1087
|
+
...this.getParameters(input),
|
|
1088
|
+
{ key: "DATA_ONLY", value: true }
|
|
1089
|
+
]
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
getResources(input) {
|
|
1093
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1094
|
+
}
|
|
1095
|
+
getParameters(input) {
|
|
1096
|
+
return [
|
|
1097
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1098
|
+
{ key: "CAUSE_ID", value: input.causeId },
|
|
1099
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1100
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1101
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
1102
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1103
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1104
|
+
{ key: "PARITY", value: input.parity },
|
|
1105
|
+
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
1106
|
+
{ key: "STATUS", value: input.status },
|
|
1107
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1108
|
+
{
|
|
1109
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
1110
|
+
value: input.arrivalDateRange?.start ?? null
|
|
1111
|
+
},
|
|
1112
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null }
|
|
1113
|
+
];
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
|
|
1117
|
+
// src/namespaces/pig-master/reports/female-swine-ear-tag-replacement-list.ts
|
|
1118
|
+
var FemaleSwineEarTagReplacementList = class extends Report {
|
|
1119
|
+
constructor() {
|
|
1120
|
+
super(...arguments);
|
|
1121
|
+
this.template = "@pig-master/female-swine-ear-tag-replacement-list";
|
|
1122
|
+
this.fileName = "Trocas de brinco de f\xEAmeas";
|
|
1123
|
+
}
|
|
1124
|
+
async pdf(input) {
|
|
1125
|
+
return this.requestPdf({
|
|
1126
|
+
resources: this.getResources(input),
|
|
1127
|
+
parameters: [
|
|
1128
|
+
...this.getParameters(input),
|
|
1129
|
+
{ key: "DATA_ONLY", value: false }
|
|
1130
|
+
]
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
async csv(input) {
|
|
1134
|
+
return this.requestCsv({
|
|
1135
|
+
resources: this.getResources(input),
|
|
1136
|
+
parameters: [
|
|
1137
|
+
...this.getParameters(input),
|
|
1138
|
+
{ key: "DATA_ONLY", value: true }
|
|
1139
|
+
]
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
getResources(input) {
|
|
1143
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1144
|
+
}
|
|
1145
|
+
getParameters(input) {
|
|
1146
|
+
return [
|
|
1147
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1148
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1149
|
+
{ key: "OLD_EAR_TAG", value: input.oldEarTag },
|
|
1150
|
+
{ key: "NEW_EAR_TAG", value: input.newEarTag },
|
|
1151
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
1152
|
+
];
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
// src/namespaces/pig-master/reports/female-swine-inventory.ts
|
|
1157
|
+
var FemaleSwineInventory = class extends Report {
|
|
1158
|
+
constructor() {
|
|
1159
|
+
super(...arguments);
|
|
1160
|
+
this.template = "@pig-master/female-swine-inventory";
|
|
1161
|
+
this.fileName = "Estoque de f\xEAmeas";
|
|
1162
|
+
}
|
|
1163
|
+
async pdf(input) {
|
|
1164
|
+
return this.requestPdf({
|
|
1165
|
+
resources: this.getResources(input),
|
|
1166
|
+
parameters: [
|
|
1167
|
+
...this.getParameters(input),
|
|
1168
|
+
{ key: "DATA_ONLY", value: false }
|
|
1169
|
+
]
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
async csv(input) {
|
|
1173
|
+
return this.requestCsv({
|
|
1174
|
+
resources: this.getResources(input),
|
|
1175
|
+
parameters: [
|
|
1176
|
+
...this.getParameters(input),
|
|
1177
|
+
{ key: "DATA_ONLY", value: true }
|
|
1178
|
+
]
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
getResources(input) {
|
|
1182
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1183
|
+
}
|
|
1184
|
+
getParameters(input) {
|
|
1185
|
+
return [
|
|
1186
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
1187
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
1188
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1189
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1190
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1191
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId }
|
|
1192
|
+
];
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
|
|
1196
|
+
// src/namespaces/pig-master/reports/female-swine-pending-action-list.ts
|
|
1197
|
+
var FemaleSwinePendingActionList = class extends Report {
|
|
1198
|
+
constructor() {
|
|
1199
|
+
super(...arguments);
|
|
1200
|
+
this.template = "@pig-master/female-swine-pending-action-list";
|
|
1201
|
+
this.fileName = "A\xE7\xF5es pendentes";
|
|
1202
|
+
}
|
|
1203
|
+
async pdf(input) {
|
|
1204
|
+
return this.requestPdf({
|
|
1205
|
+
resources: this.getResources(input),
|
|
1206
|
+
parameters: [
|
|
1207
|
+
...this.getParameters(input),
|
|
1208
|
+
{ key: "DATA_ONLY", value: false }
|
|
1209
|
+
]
|
|
1210
|
+
});
|
|
1211
|
+
}
|
|
1212
|
+
async csv(input) {
|
|
1213
|
+
return this.requestCsv({
|
|
1214
|
+
resources: this.getResources(input),
|
|
1215
|
+
parameters: [
|
|
1216
|
+
...this.getParameters(input),
|
|
1217
|
+
{ key: "DATA_ONLY", value: true }
|
|
1218
|
+
]
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
getResources(input) {
|
|
1222
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1223
|
+
}
|
|
1224
|
+
getParameters(input) {
|
|
1225
|
+
return [
|
|
1226
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1227
|
+
{ key: "STATUS", value: input.status },
|
|
1228
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
1229
|
+
];
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
// src/namespaces/pig-master/reports/female-swine-pre-discard-list.ts
|
|
1234
|
+
var FemaleSwinePreDiscardList = class extends Report {
|
|
1235
|
+
constructor() {
|
|
1236
|
+
super(...arguments);
|
|
1237
|
+
this.template = "@pig-master/female-swine-pre-discard-list";
|
|
1238
|
+
this.fileName = "Listagem de pr\xE9-descartes de f\xEAmeas";
|
|
1239
|
+
}
|
|
1240
|
+
async pdf(input) {
|
|
1241
|
+
return this.requestPdf({
|
|
1242
|
+
resources: this.getResources(input),
|
|
1243
|
+
parameters: [
|
|
1244
|
+
...this.getParameters(input),
|
|
1245
|
+
{ key: "DATA_ONLY", value: false }
|
|
1246
|
+
]
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
async csv(input) {
|
|
1250
|
+
return this.requestCsv({
|
|
1251
|
+
resources: this.getResources(input),
|
|
1252
|
+
parameters: [
|
|
1253
|
+
...this.getParameters(input),
|
|
1254
|
+
{ key: "DATA_ONLY", value: true }
|
|
1255
|
+
]
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
getResources(input) {
|
|
1259
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1260
|
+
}
|
|
1261
|
+
getParameters(input) {
|
|
1262
|
+
return [
|
|
1263
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1264
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1265
|
+
{ key: "PRE_DISCARD", value: input.preDiscard },
|
|
1266
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1267
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1268
|
+
{ key: "ORDERBYCOLUMN", value: input.orderBy.column },
|
|
1269
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction }
|
|
1270
|
+
];
|
|
1271
|
+
}
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1274
|
+
// src/namespaces/pig-master/reports/female-swine-record.ts
|
|
1275
|
+
var FemaleSwineRecord = class extends Report {
|
|
1276
|
+
constructor() {
|
|
1277
|
+
super(...arguments);
|
|
1278
|
+
this.template = "@pig-master/female-swine-record";
|
|
1279
|
+
this.fileName = "Ficha da f\xEAmea";
|
|
1280
|
+
}
|
|
1281
|
+
async pdf(input) {
|
|
1282
|
+
return this.requestPdf({
|
|
1283
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1284
|
+
parameters: [
|
|
1285
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1286
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
1287
|
+
{ key: "BORN_FOLLOW", value: input.farrowingAssistance },
|
|
1288
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
1289
|
+
]
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
|
|
1294
|
+
// src/namespaces/pig-master/reports/female-swine-sale-planning-list.ts
|
|
1295
|
+
var FemaleSwineSalePlanningList = class extends Report {
|
|
1296
|
+
constructor() {
|
|
1297
|
+
super(...arguments);
|
|
1298
|
+
this.template = "@pig-master/female-swine-sale-planning-list";
|
|
1299
|
+
this.fileName = "Listagem de f\xEAmeas planejadas para venda";
|
|
1300
|
+
}
|
|
1301
|
+
async pdf(input) {
|
|
1302
|
+
return this.requestPdf({
|
|
1303
|
+
resources: this.getResources(input),
|
|
1304
|
+
parameters: [
|
|
1305
|
+
...this.getParameters(input),
|
|
1306
|
+
{ key: "DATA_ONLY", value: false }
|
|
1307
|
+
]
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
async csv(input) {
|
|
1311
|
+
return this.requestCsv({
|
|
1312
|
+
resources: this.getResources(input),
|
|
1313
|
+
parameters: [
|
|
1314
|
+
...this.getParameters(input),
|
|
1315
|
+
{ key: "DATA_ONLY", value: true }
|
|
1316
|
+
]
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
getResources(input) {
|
|
1320
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1321
|
+
}
|
|
1322
|
+
getParameters(input) {
|
|
1323
|
+
return [
|
|
1324
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1325
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1326
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1327
|
+
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
1328
|
+
{ key: "ORDERBYCOLUMN", value: input.orderBy.column },
|
|
1329
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction }
|
|
1330
|
+
];
|
|
1331
|
+
}
|
|
1332
|
+
};
|
|
1333
|
+
|
|
1334
|
+
// src/namespaces/pig-master/reports/female-swine-treatment-collection-form.ts
|
|
1335
|
+
var FemaleSwineTreatmentCollectionForm = class extends Report {
|
|
1336
|
+
constructor() {
|
|
1337
|
+
super(...arguments);
|
|
1338
|
+
this.template = "@pig-master/female-swine-treatment-collection-form";
|
|
1339
|
+
this.fileName = "Medica\xE7\xE3o / vacina\xE7\xE3o de f\xEAmea";
|
|
1340
|
+
}
|
|
1341
|
+
async pdf(input) {
|
|
1342
|
+
return this.requestPdf({
|
|
1343
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1344
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
// src/namespaces/pig-master/reports/female-swine-treatment-list.ts
|
|
1350
|
+
var FemaleSwineTreatmentList = class extends Report {
|
|
1351
|
+
constructor() {
|
|
1352
|
+
super(...arguments);
|
|
1353
|
+
this.template = "@pig-master/female-swine-treatment-list";
|
|
1354
|
+
this.fileName = "Listagem de medica\xE7\xF5es / vacinas (f\xEAmeas)";
|
|
1355
|
+
}
|
|
1356
|
+
async pdf(input) {
|
|
1357
|
+
return this.requestPdf({
|
|
1358
|
+
resources: this.getResources(input),
|
|
1359
|
+
parameters: [
|
|
1360
|
+
...this.getParameters(input),
|
|
1361
|
+
{ key: "DATA_ONLY", value: false }
|
|
1362
|
+
]
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
async csv(input) {
|
|
1366
|
+
return this.requestCsv({
|
|
1367
|
+
resources: this.getResources(input),
|
|
1368
|
+
parameters: [
|
|
1369
|
+
...this.getParameters(input),
|
|
1370
|
+
{ key: "DATA_ONLY", value: true }
|
|
1371
|
+
]
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
getResources(input) {
|
|
1375
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1376
|
+
}
|
|
1377
|
+
getParameters(input) {
|
|
1378
|
+
return [
|
|
1379
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1380
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1381
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1382
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1383
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId }
|
|
1384
|
+
];
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
// src/namespaces/pig-master/reports/finishing-piglet-death-collection-form.ts
|
|
1389
|
+
var FinishingPigletDeathCollectionForm = class extends Report {
|
|
1390
|
+
constructor() {
|
|
1391
|
+
super(...arguments);
|
|
1392
|
+
this.template = "@pig-master/finishing-piglet-death-collection-form";
|
|
1393
|
+
this.fileName = "Morte de leit\xE3o na termina\xE7\xE3o";
|
|
1394
|
+
}
|
|
1395
|
+
async pdf(input) {
|
|
1396
|
+
return this.requestPdf({
|
|
1397
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1398
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
|
|
1403
|
+
// src/namespaces/pig-master/reports/flushing-female-swine-list.ts
|
|
1404
|
+
var FlushingFemaleSwineList = class extends Report {
|
|
1405
|
+
constructor() {
|
|
1406
|
+
super(...arguments);
|
|
1407
|
+
this.template = "@pig-master/flushing-female-swine-list";
|
|
1408
|
+
this.fileName = "F\xEAmeas flushing";
|
|
1409
|
+
}
|
|
1410
|
+
async pdf(input) {
|
|
1411
|
+
return this.requestPdf({
|
|
1412
|
+
resources: this.getResources(input),
|
|
1413
|
+
parameters: [
|
|
1414
|
+
...this.getParameters(input),
|
|
1415
|
+
{ key: "DATA_ONLY", value: false }
|
|
1416
|
+
]
|
|
1417
|
+
});
|
|
1418
|
+
}
|
|
1419
|
+
async csv(input) {
|
|
1420
|
+
return this.requestCsv({
|
|
1421
|
+
resources: this.getResources(input),
|
|
1422
|
+
parameters: [
|
|
1423
|
+
...this.getParameters(input),
|
|
1424
|
+
{ key: "DATA_ONLY", value: true }
|
|
1425
|
+
]
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1428
|
+
getResources(input) {
|
|
1429
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1430
|
+
}
|
|
1431
|
+
getParameters(input) {
|
|
1432
|
+
return [
|
|
1433
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
1434
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
1435
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1436
|
+
{ key: "ORIGIN_ID", value: input.originId }
|
|
1437
|
+
];
|
|
1438
|
+
}
|
|
1439
|
+
};
|
|
1440
|
+
|
|
1441
|
+
// src/namespaces/pig-master/reports/flushing-monitor.ts
|
|
1442
|
+
var FlushingMonitor = class extends Report {
|
|
1443
|
+
constructor() {
|
|
1444
|
+
super(...arguments);
|
|
1445
|
+
this.template = "@pig-master/flushing-monitor";
|
|
1446
|
+
this.fileName = "Flushing";
|
|
1447
|
+
}
|
|
1448
|
+
async pdf(input) {
|
|
1449
|
+
return this.requestPdf({
|
|
1450
|
+
resources: this.getResources(input),
|
|
1451
|
+
parameters: [
|
|
1452
|
+
...this.getParameters(input),
|
|
1453
|
+
{ key: "DATA_ONLY", value: false }
|
|
1454
|
+
]
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
async csv(input) {
|
|
1458
|
+
return this.requestCsv({
|
|
1459
|
+
resources: this.getResources(input),
|
|
1460
|
+
parameters: [
|
|
1461
|
+
...this.getParameters(input),
|
|
1462
|
+
{ key: "DATA_ONLY", value: true }
|
|
1463
|
+
]
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
getResources(input) {
|
|
1467
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1468
|
+
}
|
|
1469
|
+
getParameters(input) {
|
|
1470
|
+
return [
|
|
1471
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
1472
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
1473
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1474
|
+
{ key: "ORIGIN_ID", value: input.originId }
|
|
1475
|
+
];
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
|
|
1479
|
+
// src/namespaces/pig-master/reports/gilt-inventory.ts
|
|
1480
|
+
var GiltInventory = class extends Report {
|
|
1481
|
+
constructor() {
|
|
1482
|
+
super(...arguments);
|
|
1483
|
+
this.template = "@pig-master/gilt-inventory";
|
|
1484
|
+
this.fileName = "Estoque de leitoas";
|
|
1485
|
+
}
|
|
1486
|
+
async pdf(input) {
|
|
1487
|
+
return this.requestPdf({
|
|
1488
|
+
resources: this.getResources(input),
|
|
1489
|
+
parameters: [
|
|
1490
|
+
...this.getParameters(input),
|
|
1491
|
+
{ key: "DATA_ONLY", value: false }
|
|
1492
|
+
]
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
async csv(input) {
|
|
1496
|
+
return this.requestCsv({
|
|
1497
|
+
resources: this.getResources(input),
|
|
1498
|
+
parameters: [
|
|
1499
|
+
...this.getParameters(input),
|
|
1500
|
+
{ key: "DATA_ONLY", value: true }
|
|
1501
|
+
]
|
|
1502
|
+
});
|
|
1503
|
+
}
|
|
1504
|
+
getResources(input) {
|
|
1505
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1506
|
+
}
|
|
1507
|
+
getParameters(input) {
|
|
1508
|
+
return [
|
|
1509
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
1510
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
1511
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1512
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1513
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1514
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId }
|
|
1515
|
+
];
|
|
1516
|
+
}
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
// src/namespaces/pig-master/reports/gta-list.ts
|
|
1520
|
+
var GtaList = class extends Report {
|
|
1521
|
+
constructor() {
|
|
1522
|
+
super(...arguments);
|
|
1523
|
+
this.template = "@pig-master/gta-list";
|
|
1524
|
+
this.fileName = "Listagem de gtas";
|
|
1525
|
+
}
|
|
1526
|
+
async pdf(input) {
|
|
1527
|
+
return this.requestPdf({
|
|
1528
|
+
resources: this.getResources(input),
|
|
1529
|
+
parameters: [
|
|
1530
|
+
...this.getParameters(input),
|
|
1531
|
+
{ key: "DATA_ONLY", value: false }
|
|
1532
|
+
]
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
async csv(input) {
|
|
1536
|
+
return this.requestCsv({
|
|
1537
|
+
resources: this.getResources(input),
|
|
1538
|
+
parameters: [
|
|
1539
|
+
...this.getParameters(input),
|
|
1540
|
+
{ key: "DATA_ONLY", value: true }
|
|
1541
|
+
]
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1544
|
+
getResources(input) {
|
|
1545
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1546
|
+
}
|
|
1547
|
+
getParameters(input) {
|
|
1548
|
+
return [
|
|
1549
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1550
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
1551
|
+
];
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
|
|
1555
|
+
// src/namespaces/pig-master/reports/heat-detection-collection-form.ts
|
|
1556
|
+
var HeatDetectionCollectionForm = class extends Report {
|
|
1557
|
+
constructor() {
|
|
1558
|
+
super(...arguments);
|
|
1559
|
+
this.template = "@pig-master/heat-detection-collection-form";
|
|
1560
|
+
this.fileName = "Registro de cio";
|
|
1561
|
+
}
|
|
1562
|
+
async pdf(input) {
|
|
1563
|
+
return this.requestPdf({
|
|
1564
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1565
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
};
|
|
1569
|
+
|
|
1570
|
+
// src/namespaces/pig-master/reports/heat-detection-list.ts
|
|
1571
|
+
var HeatDetectionList = class extends Report {
|
|
1572
|
+
constructor() {
|
|
1573
|
+
super(...arguments);
|
|
1574
|
+
this.template = "@pig-master/heat-detection-list";
|
|
1575
|
+
this.fileName = "Listagem de registros de cio";
|
|
1576
|
+
}
|
|
1577
|
+
async pdf(input) {
|
|
1578
|
+
return this.requestPdf({
|
|
1579
|
+
resources: this.getResources(input),
|
|
1580
|
+
parameters: [
|
|
1581
|
+
...this.getParameters(input),
|
|
1582
|
+
{ key: "DATA_ONLY", value: false }
|
|
1583
|
+
]
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
async csv(input) {
|
|
1587
|
+
return this.requestCsv({
|
|
1588
|
+
resources: this.getResources(input),
|
|
1589
|
+
parameters: [
|
|
1590
|
+
...this.getParameters(input),
|
|
1591
|
+
{ key: "DATA_ONLY", value: true }
|
|
1592
|
+
]
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1595
|
+
getResources(input) {
|
|
1596
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1597
|
+
}
|
|
1598
|
+
getParameters(input) {
|
|
1599
|
+
return [
|
|
1600
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1601
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1602
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1603
|
+
{
|
|
1604
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
1605
|
+
value: input.arrivalDateRange?.start ?? null
|
|
1606
|
+
},
|
|
1607
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null },
|
|
1608
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1609
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1610
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
1611
|
+
{ key: "NUMBER", value: input.number },
|
|
1612
|
+
{ key: "STIMULUS", value: input.stimulus },
|
|
1613
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction },
|
|
1614
|
+
{ key: "ORDERBYCOLUMN", value: input.orderBy.column }
|
|
1615
|
+
];
|
|
1616
|
+
}
|
|
1617
|
+
};
|
|
1618
|
+
|
|
1619
|
+
// src/namespaces/pig-master/reports/heat-monitoring.ts
|
|
1620
|
+
var HeatMonitoring = class extends Report {
|
|
1621
|
+
constructor() {
|
|
1622
|
+
super(...arguments);
|
|
1623
|
+
this.template = "@pig-master/heat-monitoring";
|
|
1624
|
+
this.fileName = "Mapa de Cio";
|
|
1625
|
+
}
|
|
1626
|
+
async pdf(input) {
|
|
1627
|
+
return this.requestPdf({
|
|
1628
|
+
resources: this.getResources(input),
|
|
1629
|
+
parameters: [
|
|
1630
|
+
...this.getParameters(input),
|
|
1631
|
+
{ key: "DATA_ONLY", value: false }
|
|
1632
|
+
]
|
|
1633
|
+
});
|
|
1634
|
+
}
|
|
1635
|
+
async csv(input) {
|
|
1636
|
+
return this.requestCsv({
|
|
1637
|
+
resources: this.getResources(input),
|
|
1638
|
+
parameters: [
|
|
1639
|
+
...this.getParameters(input),
|
|
1640
|
+
{ key: "DATA_ONLY", value: true }
|
|
1641
|
+
]
|
|
1642
|
+
});
|
|
1643
|
+
}
|
|
1644
|
+
getResources(input) {
|
|
1645
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1646
|
+
}
|
|
1647
|
+
getParameters(input) {
|
|
1648
|
+
return [
|
|
1649
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
1650
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
1651
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1652
|
+
{ key: "PAGE", value: input.pagination.page },
|
|
1653
|
+
{ key: "PER_PAGE", value: input.pagination.perPage },
|
|
1654
|
+
{ key: "ORIGIN_ID", value: input.originId }
|
|
1655
|
+
];
|
|
1656
|
+
}
|
|
1657
|
+
};
|
|
1658
|
+
|
|
1659
|
+
// src/namespaces/pig-master/reports/location-list.ts
|
|
1660
|
+
var LocationList = class extends Report {
|
|
1661
|
+
constructor() {
|
|
1662
|
+
super(...arguments);
|
|
1663
|
+
this.template = "@pig-master/location-list";
|
|
1664
|
+
this.fileName = "Listagem de localiza\xE7\xF5es";
|
|
1665
|
+
}
|
|
1666
|
+
async pdf(input) {
|
|
1667
|
+
return this.requestPdf({
|
|
1668
|
+
resources: this.getResources(input),
|
|
1669
|
+
parameters: [
|
|
1670
|
+
...this.getParameters(input),
|
|
1671
|
+
{ key: "DATA_ONLY", value: false }
|
|
1672
|
+
]
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
async csv(input) {
|
|
1676
|
+
return this.requestCsv({
|
|
1677
|
+
resources: this.getResources(input),
|
|
1678
|
+
parameters: [
|
|
1679
|
+
...this.getParameters(input),
|
|
1680
|
+
{ key: "DATA_ONLY", value: true }
|
|
1681
|
+
]
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
getResources(input) {
|
|
1685
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1686
|
+
}
|
|
1687
|
+
getParameters(input) {
|
|
1688
|
+
return [{ key: "LOCATE", value: input.language.replace("-", "_") }];
|
|
1689
|
+
}
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
// src/namespaces/pig-master/reports/maternity-piglet-death-collection-form.ts
|
|
1693
|
+
var MaternityPigletDeathCollectionForm = class extends Report {
|
|
1694
|
+
constructor() {
|
|
1695
|
+
super(...arguments);
|
|
1696
|
+
this.template = "@pig-master/maternity-piglet-death-collection-form";
|
|
1697
|
+
this.fileName = "Morte de leit\xE3o na maternidade";
|
|
1698
|
+
}
|
|
1699
|
+
async pdf(input) {
|
|
1700
|
+
return this.requestPdf({
|
|
1701
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1702
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
|
|
1707
|
+
// src/namespaces/pig-master/reports/maternity-piglet-transfer-collection-form.ts
|
|
1708
|
+
var MaternityPigletTransferCollectionForm = class extends Report {
|
|
1709
|
+
constructor() {
|
|
1710
|
+
super(...arguments);
|
|
1711
|
+
this.template = "@pig-master/maternity-piglet-transfer-collection-form";
|
|
1712
|
+
this.fileName = "Transfer\xEAncia de leit\xE3o na maternidade";
|
|
1713
|
+
}
|
|
1714
|
+
async pdf(input) {
|
|
1715
|
+
return this.requestPdf({
|
|
1716
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1717
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
};
|
|
1721
|
+
|
|
1722
|
+
// src/namespaces/pig-master/reports/mating-analysis.ts
|
|
1723
|
+
var MatingAnalysis = class extends Report {
|
|
1724
|
+
constructor() {
|
|
1725
|
+
super(...arguments);
|
|
1726
|
+
this.template = "@pig-master/mating-analysis";
|
|
1727
|
+
this.fileName = "An\xE1lise de coberturas";
|
|
1728
|
+
}
|
|
1729
|
+
async pdf(input) {
|
|
1730
|
+
return this.requestPdf({
|
|
1731
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1732
|
+
parameters: [
|
|
1733
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1734
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1735
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1736
|
+
{ key: "GROUP", value: input.groupBy },
|
|
1737
|
+
{ key: "FIELD", value: input.emphasis },
|
|
1738
|
+
{ key: "PARITY", value: input.parity },
|
|
1739
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1740
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1741
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
1742
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
1743
|
+
{
|
|
1744
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
1745
|
+
value: input.arrivalDateRange?.start ?? null
|
|
1746
|
+
},
|
|
1747
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null },
|
|
1748
|
+
{
|
|
1749
|
+
key: "ARRIVAL_REPRODUCTIVE_STATUS",
|
|
1750
|
+
value: input.arrivalReproductiveStatus
|
|
1751
|
+
},
|
|
1752
|
+
{ key: "MATING_CONTEXT", value: input.matingContext },
|
|
1753
|
+
{ key: "METHOD", value: input.method },
|
|
1754
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") }
|
|
1755
|
+
]
|
|
1756
|
+
});
|
|
1757
|
+
}
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1760
|
+
// src/namespaces/pig-master/reports/mating-collection-form.ts
|
|
1761
|
+
var MatingCollectionForm = class extends Report {
|
|
1762
|
+
constructor() {
|
|
1763
|
+
super(...arguments);
|
|
1764
|
+
this.template = "@pig-master/mating-collection-form";
|
|
1765
|
+
this.fileName = "Cobertura";
|
|
1766
|
+
}
|
|
1767
|
+
async pdf(input) {
|
|
1768
|
+
return this.requestPdf({
|
|
1769
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1770
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1775
|
+
// src/namespaces/pig-master/reports/mating-group-list.ts
|
|
1776
|
+
var MatingGroupList = class extends Report {
|
|
1777
|
+
constructor() {
|
|
1778
|
+
super(...arguments);
|
|
1779
|
+
this.template = "@pig-master/mating-group-list";
|
|
1780
|
+
this.fileName = "Listagem de grupos de cobertura";
|
|
1781
|
+
}
|
|
1782
|
+
async pdf(input) {
|
|
1783
|
+
return this.requestPdf({
|
|
1784
|
+
resources: this.getResources(input),
|
|
1785
|
+
parameters: [
|
|
1786
|
+
...this.getParameters(input),
|
|
1787
|
+
{ key: "DATA_ONLY", value: false }
|
|
1788
|
+
]
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
async csv(input) {
|
|
1792
|
+
return this.requestCsv({
|
|
1793
|
+
resources: this.getResources(input),
|
|
1794
|
+
parameters: [
|
|
1795
|
+
...this.getParameters(input),
|
|
1796
|
+
{ key: "DATA_ONLY", value: true }
|
|
1797
|
+
]
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
getResources(input) {
|
|
1801
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1802
|
+
}
|
|
1803
|
+
getParameters(input) {
|
|
1804
|
+
return [{ key: "LOCATE", value: input.language.replace("-", "_") }];
|
|
1805
|
+
}
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
// src/namespaces/pig-master/reports/mating-list.ts
|
|
1809
|
+
var MatingList = class extends Report {
|
|
1810
|
+
constructor() {
|
|
1811
|
+
super(...arguments);
|
|
1812
|
+
this.template = "@pig-master/mating-list";
|
|
1813
|
+
this.fileName = "Listagem de coberturas";
|
|
1814
|
+
}
|
|
1815
|
+
async pdf(input) {
|
|
1816
|
+
return this.requestPdf({
|
|
1817
|
+
resources: this.getResources(input),
|
|
1818
|
+
parameters: [
|
|
1819
|
+
...this.getParameters(input),
|
|
1820
|
+
{ key: "DATA_ONLY", value: false }
|
|
1821
|
+
]
|
|
1822
|
+
});
|
|
1823
|
+
}
|
|
1824
|
+
async csv(input) {
|
|
1825
|
+
return this.requestCsv({
|
|
1826
|
+
resources: this.getResources(input),
|
|
1827
|
+
parameters: [
|
|
1828
|
+
...this.getParameters(input),
|
|
1829
|
+
{ key: "DATA_ONLY", value: true }
|
|
1830
|
+
]
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
getResources(input) {
|
|
1834
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1835
|
+
}
|
|
1836
|
+
getParameters(input) {
|
|
1837
|
+
return [
|
|
1838
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1839
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1840
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1841
|
+
{ key: "MANAGEMENT_CYCLE", value: input.managementCycle },
|
|
1842
|
+
{ key: "PARITY", value: input.parity },
|
|
1843
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1844
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1845
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
1846
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
1847
|
+
{
|
|
1848
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
1849
|
+
value: input.arrivalDateRange?.start ?? null
|
|
1850
|
+
},
|
|
1851
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null },
|
|
1852
|
+
{
|
|
1853
|
+
key: "ARRIVAL_REPRODUCTIVE_STATUS",
|
|
1854
|
+
value: input.arrivalReproductiveStatus
|
|
1855
|
+
},
|
|
1856
|
+
{ key: "MATING_CONTEXT", value: input.matingContext },
|
|
1857
|
+
{ key: "ORDER_BY_COLUMN", value: input.orderBy.column },
|
|
1858
|
+
{ key: "ORDER_BY_DIRECTION", value: input.orderBy.direction },
|
|
1859
|
+
{ key: "METHOD", value: input.method },
|
|
1860
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") }
|
|
1861
|
+
];
|
|
1862
|
+
}
|
|
1863
|
+
};
|
|
1864
|
+
|
|
1865
|
+
// src/namespaces/pig-master/reports/mating-overview.ts
|
|
1866
|
+
var MatingOverview = class extends Report {
|
|
1867
|
+
constructor() {
|
|
1868
|
+
super(...arguments);
|
|
1869
|
+
this.template = "@pig-master/mating-overview";
|
|
1870
|
+
this.fileName = "Performance de coberturas";
|
|
1871
|
+
}
|
|
1872
|
+
async pdf(input) {
|
|
1873
|
+
return this.requestPdf({
|
|
1874
|
+
resources: this.getResources(input),
|
|
1875
|
+
parameters: [
|
|
1876
|
+
...this.getParameters(input),
|
|
1877
|
+
{ key: "DATA_ONLY", value: false }
|
|
1878
|
+
]
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1881
|
+
async csv(input) {
|
|
1882
|
+
return this.requestCsv({
|
|
1883
|
+
resources: this.getResources(input),
|
|
1884
|
+
parameters: [
|
|
1885
|
+
...this.getParameters(input),
|
|
1886
|
+
{ key: "DATA_ONLY", value: true }
|
|
1887
|
+
]
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
getResources(input) {
|
|
1891
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1892
|
+
}
|
|
1893
|
+
getParameters(input) {
|
|
1894
|
+
return [
|
|
1895
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
1896
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
1897
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1898
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1899
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1900
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId }
|
|
1901
|
+
];
|
|
1902
|
+
}
|
|
1903
|
+
};
|
|
1904
|
+
|
|
1905
|
+
// src/namespaces/pig-master/reports/mbrf-female-swine-record.ts
|
|
1906
|
+
var MbrfFemaleSwineRecord = class extends Report {
|
|
1907
|
+
constructor() {
|
|
1908
|
+
super(...arguments);
|
|
1909
|
+
this.template = "@pig-master/mbrf-female-swine-record";
|
|
1910
|
+
this.fileName = "Ficha fim";
|
|
1911
|
+
}
|
|
1912
|
+
async pdf(input) {
|
|
1913
|
+
return this.requestPdf({
|
|
1914
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1915
|
+
parameters: [
|
|
1916
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
1917
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
1918
|
+
]
|
|
1919
|
+
});
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
|
|
1923
|
+
// src/namespaces/pig-master/reports/nursery-piglet-death-collection-form.ts
|
|
1924
|
+
var NurseryPigletDeathCollectionForm = class extends Report {
|
|
1925
|
+
constructor() {
|
|
1926
|
+
super(...arguments);
|
|
1927
|
+
this.template = "@pig-master/nursery-piglet-death-collection-form";
|
|
1928
|
+
this.fileName = "Morte de leit\xE3o na creche";
|
|
1929
|
+
}
|
|
1930
|
+
async pdf(input) {
|
|
1931
|
+
return this.requestPdf({
|
|
1932
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1933
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1934
|
+
});
|
|
1935
|
+
}
|
|
1936
|
+
};
|
|
1937
|
+
|
|
1938
|
+
// src/namespaces/pig-master/reports/origin-list.ts
|
|
1939
|
+
var OriginList = class extends Report {
|
|
1940
|
+
constructor() {
|
|
1941
|
+
super(...arguments);
|
|
1942
|
+
this.template = "@pig-master/origin-list";
|
|
1943
|
+
this.fileName = "Listagem de origens";
|
|
1944
|
+
}
|
|
1945
|
+
async pdf(input) {
|
|
1946
|
+
return this.requestPdf({
|
|
1947
|
+
resources: this.getResources(input),
|
|
1948
|
+
parameters: [
|
|
1949
|
+
...this.getParameters(input),
|
|
1950
|
+
{ key: "DATA_ONLY", value: false }
|
|
1951
|
+
]
|
|
1952
|
+
});
|
|
1953
|
+
}
|
|
1954
|
+
async csv(input) {
|
|
1955
|
+
return this.requestCsv({
|
|
1956
|
+
resources: this.getResources(input),
|
|
1957
|
+
parameters: [
|
|
1958
|
+
...this.getParameters(input),
|
|
1959
|
+
{ key: "DATA_ONLY", value: true }
|
|
1960
|
+
]
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
getResources(input) {
|
|
1964
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1965
|
+
}
|
|
1966
|
+
getParameters(input) {
|
|
1967
|
+
return [{ key: "LOCATE", value: input.language.replace("-", "_") }];
|
|
1968
|
+
}
|
|
1969
|
+
};
|
|
1970
|
+
|
|
1971
|
+
// src/namespaces/pig-master/reports/parity-structure.ts
|
|
1972
|
+
var ParityStructure = class extends Report {
|
|
1973
|
+
constructor() {
|
|
1974
|
+
super(...arguments);
|
|
1975
|
+
this.template = "@pig-master/parity-structure";
|
|
1976
|
+
this.fileName = "Estrutura et\xE1ria";
|
|
1977
|
+
}
|
|
1978
|
+
async pdf(input) {
|
|
1979
|
+
return this.requestPdf({
|
|
1980
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1981
|
+
parameters: [
|
|
1982
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
1983
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
1984
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
1985
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
1986
|
+
{ key: "STATUS", value: input.status }
|
|
1987
|
+
]
|
|
1988
|
+
});
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
|
|
1992
|
+
// src/namespaces/pig-master/reports/pre-flushing-female-swine-list.ts
|
|
1993
|
+
var PreFlushingFemaleSwineList = class extends Report {
|
|
1994
|
+
constructor() {
|
|
1995
|
+
super(...arguments);
|
|
1996
|
+
this.template = "@pig-master/pre-flushing-female-swine-list";
|
|
1997
|
+
this.fileName = "F\xEAmeas pr\xE9-flushing";
|
|
1998
|
+
}
|
|
1999
|
+
async pdf(input) {
|
|
2000
|
+
return this.requestPdf({
|
|
2001
|
+
resources: this.getResources(input),
|
|
2002
|
+
parameters: [
|
|
2003
|
+
...this.getParameters(input),
|
|
2004
|
+
{ key: "DATA_ONLY", value: false }
|
|
2005
|
+
]
|
|
2006
|
+
});
|
|
2007
|
+
}
|
|
2008
|
+
async csv(input) {
|
|
2009
|
+
return this.requestCsv({
|
|
2010
|
+
resources: this.getResources(input),
|
|
2011
|
+
parameters: [
|
|
2012
|
+
...this.getParameters(input),
|
|
2013
|
+
{ key: "DATA_ONLY", value: true }
|
|
2014
|
+
]
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
2017
|
+
getResources(input) {
|
|
2018
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
2019
|
+
}
|
|
2020
|
+
getParameters(input) {
|
|
2021
|
+
return [
|
|
2022
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
2023
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
2024
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
2025
|
+
{ key: "ORIGIN_ID", value: input.originId }
|
|
2026
|
+
];
|
|
2027
|
+
}
|
|
2028
|
+
};
|
|
2029
|
+
|
|
2030
|
+
// src/namespaces/pig-master/reports/pregnant-female-swine-list.ts
|
|
2031
|
+
var PregnantFemaleSwineList = class extends Report {
|
|
2032
|
+
constructor() {
|
|
2033
|
+
super(...arguments);
|
|
2034
|
+
this.template = "@pig-master/pregnant-female-swine-list";
|
|
2035
|
+
this.fileName = "F\xEAmeas gestantes";
|
|
2036
|
+
}
|
|
2037
|
+
async pdf(input) {
|
|
2038
|
+
return this.requestPdf({
|
|
2039
|
+
resources: this.getResources(input),
|
|
2040
|
+
parameters: [
|
|
2041
|
+
{ key: "DATA_ONLY", value: false },
|
|
2042
|
+
...this.getParameters(input)
|
|
2043
|
+
]
|
|
2044
|
+
});
|
|
2045
|
+
}
|
|
2046
|
+
async csv(input) {
|
|
2047
|
+
return this.requestCsv({
|
|
2048
|
+
resources: this.getResources(input),
|
|
2049
|
+
parameters: [
|
|
2050
|
+
{ key: "DATA_ONLY", value: true },
|
|
2051
|
+
...this.getParameters(input)
|
|
2052
|
+
]
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
getResources(input) {
|
|
2056
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
2057
|
+
}
|
|
2058
|
+
getParameters(input) {
|
|
2059
|
+
return [
|
|
2060
|
+
{ key: "MATING_DATE_BEGIN", value: input.matingDateRange.start },
|
|
2061
|
+
{ key: "MATING_DATE_END", value: input.matingDateRange.end },
|
|
2062
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
2063
|
+
{ key: "GESTATION_WEEK", value: input.gestationWeek }
|
|
2064
|
+
];
|
|
2065
|
+
}
|
|
2066
|
+
};
|
|
2067
|
+
|
|
2068
|
+
// src/namespaces/pig-master/reports/pregnant-female-swine-sale-list.ts
|
|
2069
|
+
var PregnantFemaleSwineSaleList = class extends Report {
|
|
2070
|
+
constructor() {
|
|
2071
|
+
super(...arguments);
|
|
2072
|
+
this.template = "@pig-master/pregnant-female-swine-sale-list";
|
|
2073
|
+
this.fileName = "Listagem de vendas de gestantes";
|
|
2074
|
+
}
|
|
2075
|
+
async pdf(input) {
|
|
2076
|
+
return this.requestPdf({
|
|
2077
|
+
resources: this.getResources(input),
|
|
2078
|
+
parameters: [
|
|
2079
|
+
...this.getParameters(input),
|
|
2080
|
+
{ key: "DATA_ONLY", value: false }
|
|
2081
|
+
]
|
|
2082
|
+
});
|
|
2083
|
+
}
|
|
2084
|
+
async csv(input) {
|
|
2085
|
+
return this.requestCsv({
|
|
2086
|
+
resources: this.getResources(input),
|
|
2087
|
+
parameters: [
|
|
2088
|
+
...this.getParameters(input),
|
|
2089
|
+
{ key: "DATA_ONLY", value: true }
|
|
2090
|
+
]
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
getResources(input) {
|
|
2094
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
2095
|
+
}
|
|
2096
|
+
getParameters(input) {
|
|
2097
|
+
return [
|
|
2098
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
2099
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
2100
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
2101
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
2102
|
+
{ key: "MATING_DATE_BEGIN", value: input.matingDateRange?.start ?? null },
|
|
2103
|
+
{ key: "MATING_DATE_END", value: input.matingDateRange?.end ?? null },
|
|
2104
|
+
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
2105
|
+
{
|
|
2106
|
+
key: "ARRIVAL_DATE_BEGIN",
|
|
2107
|
+
value: input.arrivalDateRange?.start ?? null
|
|
2108
|
+
},
|
|
2109
|
+
{ key: "ARRIVAL_DATE_END", value: input.arrivalDateRange?.end ?? null },
|
|
2110
|
+
{ key: "ORDERBYCOLUMN", value: input.orderBy.column },
|
|
2111
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction },
|
|
2112
|
+
{ key: "DUE_DATE_BEGIN", value: input.dueDateRange?.start ?? null },
|
|
2113
|
+
{ key: "DUE_DATE_END", value: input.dueDateRange?.end ?? null },
|
|
2114
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
2115
|
+
{ key: "P_WEEKDAY", value: input.yearPeriod.weekday },
|
|
2116
|
+
{ key: "P_WEEK", value: input.yearPeriod.week }
|
|
2117
|
+
];
|
|
2118
|
+
}
|
|
2119
|
+
};
|
|
2120
|
+
|
|
2121
|
+
// src/namespaces/pig-master/reports/reproductive-failure-analysis.ts
|
|
2122
|
+
var ReproductiveFailureAnalysis = class extends Report {
|
|
2123
|
+
constructor() {
|
|
2124
|
+
super(...arguments);
|
|
2125
|
+
this.template = "@pig-master/reproductive-failure-analysis";
|
|
2126
|
+
this.fileName = "An\xE1lise de perdas de cobertura";
|
|
2127
|
+
}
|
|
2128
|
+
async pdf(input) {
|
|
2129
|
+
return this.requestPdf({
|
|
2130
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2131
|
+
parameters: [
|
|
2132
|
+
{ key: "GROUP", value: input.groupBy },
|
|
2133
|
+
{ key: "FIELD", value: input.emphasis },
|
|
2134
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
2135
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
2136
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
2137
|
+
{
|
|
2138
|
+
key: "MATING_DATE_BEGIN",
|
|
2139
|
+
value: input.matingDateRange?.start ?? null
|
|
2140
|
+
},
|
|
2141
|
+
{ key: "MATING_DATE_END", value: input.matingDateRange?.end ?? null },
|
|
2142
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
2143
|
+
{ key: "PARITY", value: input.parity },
|
|
2144
|
+
{ key: "CONTEXT", value: input.context },
|
|
2145
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
2146
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
2147
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
2148
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") }
|
|
2149
|
+
]
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
|
|
2154
|
+
// src/namespaces/pig-master/reports/reproductive-failure-collection-form.ts
|
|
2155
|
+
var ReproductiveFailureCollectionForm = class extends Report {
|
|
2156
|
+
constructor() {
|
|
2157
|
+
super(...arguments);
|
|
2158
|
+
this.template = "@pig-master/reproductive-failure-collection-form";
|
|
2159
|
+
this.fileName = "Perda de cobertura";
|
|
2160
|
+
}
|
|
2161
|
+
async pdf(input) {
|
|
2162
|
+
return this.requestPdf({
|
|
2163
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2164
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
};
|
|
2168
|
+
|
|
2169
|
+
// src/namespaces/pig-master/reports/reproductive-failure-list.ts
|
|
2170
|
+
var ReproductiveFailureList = class extends Report {
|
|
2171
|
+
constructor() {
|
|
2172
|
+
super(...arguments);
|
|
2173
|
+
this.template = "@pig-master/reproductive-failure-list";
|
|
2174
|
+
this.fileName = "Perdas de cobertura";
|
|
2175
|
+
}
|
|
2176
|
+
async pdf(input) {
|
|
2177
|
+
return this.requestPdf({
|
|
2178
|
+
resources: this.getResources(input),
|
|
2179
|
+
parameters: [
|
|
2180
|
+
...this.getParameters(input),
|
|
2181
|
+
{ key: "DATA_ONLY", value: false }
|
|
2182
|
+
]
|
|
2183
|
+
});
|
|
2184
|
+
}
|
|
2185
|
+
async csv(input) {
|
|
2186
|
+
return this.requestCsv({
|
|
2187
|
+
resources: this.getResources(input),
|
|
2188
|
+
parameters: [
|
|
2189
|
+
...this.getParameters(input),
|
|
2190
|
+
{ key: "DATA_ONLY", value: true }
|
|
2191
|
+
]
|
|
2192
|
+
});
|
|
2193
|
+
}
|
|
2194
|
+
getResources(input) {
|
|
2195
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
2196
|
+
}
|
|
2197
|
+
getParameters(input) {
|
|
2198
|
+
return [
|
|
2199
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
2200
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
2201
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
2202
|
+
{ key: "PARITY", value: input.parity },
|
|
2203
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
2204
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
2205
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
2206
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
2207
|
+
{ key: "MATING_DATE_BEGIN", value: input.matingDateRange?.start ?? null },
|
|
2208
|
+
{ key: "MATING_DATE_END", value: input.matingDateRange?.end ?? null },
|
|
2209
|
+
{ key: "CONTEXT", value: input.context },
|
|
2210
|
+
{ key: "ORDERBYCOLUMN", value: input.orderBy.column },
|
|
2211
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction }
|
|
2212
|
+
];
|
|
2213
|
+
}
|
|
2214
|
+
};
|
|
2215
|
+
|
|
2216
|
+
// src/namespaces/pig-master/reports/score-list.ts
|
|
2217
|
+
var ScoreList = class extends Report {
|
|
2218
|
+
constructor() {
|
|
2219
|
+
super(...arguments);
|
|
2220
|
+
this.template = "@pig-master/score-list";
|
|
2221
|
+
this.fileName = "Listagem de escores";
|
|
2222
|
+
}
|
|
2223
|
+
async pdf(input) {
|
|
2224
|
+
return this.requestPdf({
|
|
2225
|
+
resources: this.getResources(input),
|
|
2226
|
+
parameters: [
|
|
2227
|
+
...this.getParameters(input),
|
|
2228
|
+
{ key: "DATA_ONLY", value: false }
|
|
2229
|
+
]
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
async csv(input) {
|
|
2233
|
+
return this.requestCsv({
|
|
2234
|
+
resources: this.getResources(input),
|
|
2235
|
+
parameters: [
|
|
2236
|
+
...this.getParameters(input),
|
|
2237
|
+
{ key: "DATA_ONLY", value: true }
|
|
2238
|
+
]
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
getResources(input) {
|
|
2242
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
2243
|
+
}
|
|
2244
|
+
getParameters(input) {
|
|
2245
|
+
return [{ key: "LOCATE", value: input.language.replace("-", "_") }];
|
|
2246
|
+
}
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2249
|
+
// src/namespaces/pig-master/reports/weaning-analysis.ts
|
|
2250
|
+
var WeaningAnalysis = class extends Report {
|
|
2251
|
+
constructor() {
|
|
2252
|
+
super(...arguments);
|
|
2253
|
+
this.template = "@pig-master/weaning-analysis";
|
|
2254
|
+
this.fileName = "An\xE1lise de desmames";
|
|
2255
|
+
}
|
|
2256
|
+
async pdf(input) {
|
|
2257
|
+
return this.requestPdf({
|
|
2258
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2259
|
+
parameters: [
|
|
2260
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
2261
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
2262
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
2263
|
+
{ key: "GROUP", value: input.groupBy },
|
|
2264
|
+
{ key: "FIELD", value: input.emphasis },
|
|
2265
|
+
{ key: "PARITY", value: input.parity },
|
|
2266
|
+
{ key: "ORIGIN_ID", value: input.originId },
|
|
2267
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
2268
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
2269
|
+
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
2270
|
+
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
2271
|
+
{
|
|
2272
|
+
key: "MATING_DATE_BEGIN",
|
|
2273
|
+
value: input.matingDateRange?.start ?? null
|
|
2274
|
+
},
|
|
2275
|
+
{ key: "MATING_DATE_END", value: input.matingDateRange?.end ?? null },
|
|
2276
|
+
{ key: "CONTEXT", value: input.context }
|
|
2277
|
+
]
|
|
2278
|
+
});
|
|
2279
|
+
}
|
|
2280
|
+
};
|
|
2281
|
+
|
|
2282
|
+
// src/namespaces/pig-master/reports/weaning-collection-form.ts
|
|
2283
|
+
var WeaningCollectionForm = class extends Report {
|
|
2284
|
+
constructor() {
|
|
2285
|
+
super(...arguments);
|
|
2286
|
+
this.template = "@pig-master/weaning-collection-form";
|
|
2287
|
+
this.fileName = "Desmame";
|
|
2288
|
+
}
|
|
2289
|
+
async pdf(input) {
|
|
2290
|
+
return this.requestPdf({
|
|
2291
|
+
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2292
|
+
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
92
2295
|
};
|
|
93
2296
|
|
|
94
2297
|
// src/namespaces/pig-master/index.ts
|
|
95
|
-
var
|
|
2298
|
+
var PigMaster = class {
|
|
96
2299
|
constructor(http) {
|
|
2300
|
+
this.birthPlaceList = new BirthPlaceList(http);
|
|
2301
|
+
this.boarByBreedList = new BoarByBreedList(http);
|
|
2302
|
+
this.boarDeathCollectionForm = new BoarDeathCollectionForm(http);
|
|
2303
|
+
this.boarDeathList = new BoarDeathList(http);
|
|
2304
|
+
this.boarDiscardCollectionForm = new BoarDiscardCollectionForm(http);
|
|
2305
|
+
this.boarDiscardList = new BoarDiscardList(http);
|
|
2306
|
+
this.boarEarTagReplacementList = new BoarEarTagReplacementList(http);
|
|
2307
|
+
this.boarsInventory = new BoarsInventory(http);
|
|
2308
|
+
this.boarTreatmentCollectionForm = new BoarTreatmentCollectionForm(http);
|
|
2309
|
+
this.boarTreatmentList = new BoarTreatmentList(http);
|
|
2310
|
+
this.breedingMonitor = new BreedingMonitor(http);
|
|
2311
|
+
this.breedList = new BreedList(http);
|
|
2312
|
+
this.causeList = new CauseList(http);
|
|
2313
|
+
this.drugList = new DrugList(http);
|
|
2314
|
+
this.employeeList = new EmployeeList(http);
|
|
2315
|
+
this.farmSummary = new FarmSummary(http);
|
|
2316
|
+
this.farrowingAnalysis = new FarrowingAnalysis(http);
|
|
2317
|
+
this.farrowingCollectionForm = new FarrowingCollectionForm(http);
|
|
2318
|
+
this.farrowingTypeList = new FarrowingTypeList(http);
|
|
2319
|
+
this.femaleSwineArrivalMonitoring = new FemaleSwineArrivalMonitoring(http);
|
|
2320
|
+
this.femaleSwineByBreedList = new FemaleSwineByBreedList(http);
|
|
2321
|
+
this.femaleSwineByParityList = new FemaleSwineByParityList(http);
|
|
2322
|
+
this.femaleSwineByStatusList = new FemaleSwineByStatusList(http);
|
|
2323
|
+
this.femaleSwineByTraceabilityList = new FemaleSwineByTraceabilityList(http);
|
|
2324
|
+
this.femaleSwineDeathAnalysis = new FemaleSwineDeathAnalysis(http);
|
|
2325
|
+
this.femaleSwineDeathCollectionForm = new FemaleSwineDeathCollectionForm(
|
|
2326
|
+
http
|
|
2327
|
+
);
|
|
2328
|
+
this.femaleSwineDeathList = new FemaleSwineDeathList(http);
|
|
2329
|
+
this.femaleSwineDiscardAnalysis = new FemaleSwineDiscardAnalysis(http);
|
|
2330
|
+
this.femaleSwineDiscardCollectionForm = new FemaleSwineDiscardCollectionForm(http);
|
|
2331
|
+
this.femaleSwineDiscardList = new FemaleSwineDiscardList(http);
|
|
2332
|
+
this.femaleSwineEarTagReplacementList = new FemaleSwineEarTagReplacementList(http);
|
|
2333
|
+
this.femaleSwineInventory = new FemaleSwineInventory(http);
|
|
2334
|
+
this.femaleSwinePendingActionList = new FemaleSwinePendingActionList(http);
|
|
2335
|
+
this.femaleSwinePreDiscardList = new FemaleSwinePreDiscardList(http);
|
|
2336
|
+
this.femaleSwineRecord = new FemaleSwineRecord(http);
|
|
2337
|
+
this.femaleSwineSalePlanningList = new FemaleSwineSalePlanningList(http);
|
|
2338
|
+
this.femaleSwineTreatmentCollectionForm = new FemaleSwineTreatmentCollectionForm(http);
|
|
2339
|
+
this.femaleSwineTreatmentList = new FemaleSwineTreatmentList(http);
|
|
2340
|
+
this.finishingPigletDeathCollectionForm = new FinishingPigletDeathCollectionForm(http);
|
|
2341
|
+
this.flushingFemaleSwineList = new FlushingFemaleSwineList(http);
|
|
2342
|
+
this.flushingMonitor = new FlushingMonitor(http);
|
|
2343
|
+
this.giltInventory = new GiltInventory(http);
|
|
2344
|
+
this.gtaList = new GtaList(http);
|
|
2345
|
+
this.heatDetectionCollectionForm = new HeatDetectionCollectionForm(http);
|
|
2346
|
+
this.heatDetectionList = new HeatDetectionList(http);
|
|
2347
|
+
this.heatMonitoring = new HeatMonitoring(http);
|
|
2348
|
+
this.locationList = new LocationList(http);
|
|
2349
|
+
this.maternityPigletDeathCollectionForm = new MaternityPigletDeathCollectionForm(http);
|
|
2350
|
+
this.maternityPigletTransferCollectionForm = new MaternityPigletTransferCollectionForm(http);
|
|
2351
|
+
this.matingAnalysis = new MatingAnalysis(http);
|
|
2352
|
+
this.matingCollectionForm = new MatingCollectionForm(http);
|
|
2353
|
+
this.matingGroupList = new MatingGroupList(http);
|
|
2354
|
+
this.matingList = new MatingList(http);
|
|
2355
|
+
this.matingOverview = new MatingOverview(http);
|
|
2356
|
+
this.mbrfFemaleSwineRecord = new MbrfFemaleSwineRecord(http);
|
|
2357
|
+
this.nurseryPigletDeathCollectionForm = new NurseryPigletDeathCollectionForm(http);
|
|
97
2358
|
this.originList = new OriginList(http);
|
|
2359
|
+
this.parityStructure = new ParityStructure(http);
|
|
2360
|
+
this.preFlushingFemaleSwineList = new PreFlushingFemaleSwineList(http);
|
|
2361
|
+
this.pregnantFemaleSwineList = new PregnantFemaleSwineList(http);
|
|
2362
|
+
this.pregnantFemaleSwineSaleList = new PregnantFemaleSwineSaleList(http);
|
|
2363
|
+
this.reproductiveFailureAnalysis = new ReproductiveFailureAnalysis(http);
|
|
2364
|
+
this.reproductiveFailureCollectionForm = new ReproductiveFailureCollectionForm(http);
|
|
2365
|
+
this.reproductiveFailureList = new ReproductiveFailureList(http);
|
|
2366
|
+
this.scoreList = new ScoreList(http);
|
|
2367
|
+
this.weaningAnalysis = new WeaningAnalysis(http);
|
|
2368
|
+
this.weaningCollectionForm = new WeaningCollectionForm(http);
|
|
98
2369
|
}
|
|
99
2370
|
};
|
|
100
2371
|
|
|
@@ -102,14 +2373,14 @@ var PigMasterNamespace = class {
|
|
|
102
2373
|
var JaspionClient = class {
|
|
103
2374
|
constructor(http) {
|
|
104
2375
|
this.http = http;
|
|
105
|
-
this.pigMaster = new
|
|
2376
|
+
this.pigMaster = new PigMaster(http);
|
|
106
2377
|
}
|
|
107
2378
|
setAccessToken(token) {
|
|
108
|
-
this.http.
|
|
2379
|
+
this.http.setHeader("Authorization", `Bearer ${token}`);
|
|
109
2380
|
}
|
|
110
2381
|
};
|
|
111
|
-
function jaspion(
|
|
112
|
-
const http =
|
|
2382
|
+
function jaspion(baseUrl) {
|
|
2383
|
+
const http = new HttpClient(baseUrl);
|
|
113
2384
|
return new JaspionClient(http);
|
|
114
2385
|
}
|
|
115
2386
|
// Annotate the CommonJS export names for ESM import in node:
|