@gesagro/jaspion-sdk 2.0.10 → 2.1.0

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