flit-modulo-exportacoes 2.0.28 → 2.0.29

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.
@@ -1,45 +1,122 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
2
53
  Object.defineProperty(exports, "__esModule", { value: true });
3
54
  exports.EventosExportacoesElastic = void 0;
4
- const elastic_base_1 = require("./elastic-base");
5
- class EventosExportacoesElastic extends elastic_base_1.ElasticBase {
6
- async internalGetEventosExportacoesElastic({ contaId, tabelaEventosId }) {
7
- return await this.elasticClient.search({
8
- scroll: '1m',
9
- index: 'contas_eventosexportacoes',
10
- size: this.totalRegistrosFiltradosElastic,
11
- _source: [
12
- 'eventos',
13
- 'forma_envio_faltas'
14
- ],
15
- query: {
16
- bool: {
17
- must: [{
18
- match: {
19
- i_parent_id: contaId
20
- }
21
- }, {
22
- match: {
23
- i_id: tabelaEventosId
24
- }
25
- }, {
26
- match: {
27
- excluido: false
28
- }
29
- }]
55
+ var elastic_base_1 = require("./elastic-base");
56
+ var EventosExportacoesElastic = /** @class */ (function (_super) {
57
+ __extends(EventosExportacoesElastic, _super);
58
+ function EventosExportacoesElastic() {
59
+ return _super !== null && _super.apply(this, arguments) || this;
60
+ }
61
+ EventosExportacoesElastic.prototype.internalGetEventosExportacoesElastic = function (_a) {
62
+ var contaId = _a.contaId, tabelaEventosId = _a.tabelaEventosId;
63
+ return __awaiter(this, void 0, void 0, function () {
64
+ return __generator(this, function (_b) {
65
+ switch (_b.label) {
66
+ case 0: return [4 /*yield*/, this.elasticClient.search({
67
+ scroll: '1m',
68
+ index: 'contas_eventosexportacoes',
69
+ size: this.totalRegistrosFiltradosElastic,
70
+ _source: [
71
+ 'eventos',
72
+ 'forma_envio_faltas'
73
+ ],
74
+ query: {
75
+ bool: {
76
+ must: [{
77
+ match: {
78
+ i_parent_id: contaId
79
+ }
80
+ }, {
81
+ match: {
82
+ i_id: tabelaEventosId
83
+ }
84
+ }, {
85
+ match: {
86
+ excluido: false
87
+ }
88
+ }]
89
+ }
90
+ },
91
+ sort: [{
92
+ i_id: 'asc'
93
+ }]
94
+ })];
95
+ case 1: return [2 /*return*/, _b.sent()];
30
96
  }
31
- },
32
- sort: [{
33
- i_id: 'asc'
34
- }]
97
+ });
35
98
  });
36
- }
37
- async getEventosExportacoesElastic({ contaId, tabelaEventosId }) {
38
- const retorno = await this.retornaTodosDadosPaginacaoElastic(await this.internalGetEventosExportacoesElastic({
39
- contaId: contaId,
40
- tabelaEventosId: tabelaEventosId
41
- }));
42
- return retorno[0];
43
- }
44
- }
99
+ };
100
+ EventosExportacoesElastic.prototype.getEventosExportacoesElastic = function (_a) {
101
+ var contaId = _a.contaId, tabelaEventosId = _a.tabelaEventosId;
102
+ return __awaiter(this, void 0, void 0, function () {
103
+ var retorno, _b;
104
+ return __generator(this, function (_c) {
105
+ switch (_c.label) {
106
+ case 0:
107
+ _b = this.retornaTodosDadosPaginacaoElastic;
108
+ return [4 /*yield*/, this.internalGetEventosExportacoesElastic({
109
+ contaId: contaId,
110
+ tabelaEventosId: tabelaEventosId
111
+ })];
112
+ case 1: return [4 /*yield*/, _b.apply(this, [_c.sent()])];
113
+ case 2:
114
+ retorno = _c.sent();
115
+ return [2 /*return*/, retorno[0]];
116
+ }
117
+ });
118
+ });
119
+ };
120
+ return EventosExportacoesElastic;
121
+ }(elastic_base_1.ElasticBase));
45
122
  exports.EventosExportacoesElastic = EventosExportacoesElastic;
@@ -1,56 +1,132 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
2
53
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
54
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
55
  };
5
56
  Object.defineProperty(exports, "__esModule", { value: true });
6
57
  exports.FeriadosElastic = void 0;
7
- const moment_1 = __importDefault(require("moment"));
8
- const elastic_base_1 = require("./elastic-base");
9
- class FeriadosElastic extends elastic_base_1.ElasticBase {
10
- async internalGetFeriadosElastic({ contaId, dataFinal, dataInicial }) {
11
- return await this.elasticClient.search({
12
- scroll: '1m',
13
- index: 'contas_feriados',
14
- size: this.totalRegistrosFiltradosElastic,
15
- _source: [
16
- 'uf',
17
- 'i_id',
18
- 'tipo',
19
- 'data',
20
- 'municipio',
21
- 'todas_empresas'
22
- ],
23
- query: {
24
- bool: {
25
- must: [{
26
- match: {
27
- i_parent_id: contaId
28
- }
29
- }, {
30
- match: {
31
- excluido: false
32
- }
33
- }, {
34
- range: {
35
- data: {
36
- gte: (0, moment_1.default)(dataInicial).format('YYYY-MM-DDTHH:mm:ss.SSS'),
37
- lte: (0, moment_1.default)(dataFinal).format('YYYY-MM-DDTHH:mm:ss.SSS')
58
+ var moment_1 = __importDefault(require("moment"));
59
+ var elastic_base_1 = require("./elastic-base");
60
+ var FeriadosElastic = /** @class */ (function (_super) {
61
+ __extends(FeriadosElastic, _super);
62
+ function FeriadosElastic() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ FeriadosElastic.prototype.internalGetFeriadosElastic = function (_a) {
66
+ var contaId = _a.contaId, dataFinal = _a.dataFinal, dataInicial = _a.dataInicial;
67
+ return __awaiter(this, void 0, void 0, function () {
68
+ return __generator(this, function (_b) {
69
+ switch (_b.label) {
70
+ case 0: return [4 /*yield*/, this.elasticClient.search({
71
+ scroll: '1m',
72
+ index: 'contas_feriados',
73
+ size: this.totalRegistrosFiltradosElastic,
74
+ _source: [
75
+ 'uf',
76
+ 'i_id',
77
+ 'tipo',
78
+ 'data',
79
+ 'municipio',
80
+ 'todas_empresas'
81
+ ],
82
+ query: {
83
+ bool: {
84
+ must: [{
85
+ match: {
86
+ i_parent_id: contaId
87
+ }
88
+ }, {
89
+ match: {
90
+ excluido: false
91
+ }
92
+ }, {
93
+ range: {
94
+ data: {
95
+ gte: (0, moment_1.default)(dataInicial).format('YYYY-MM-DDTHH:mm:ss.SSS'),
96
+ lte: (0, moment_1.default)(dataFinal).format('YYYY-MM-DDTHH:mm:ss.SSS')
97
+ }
98
+ }
99
+ }]
38
100
  }
39
- }
40
- }]
101
+ },
102
+ sort: [{
103
+ data: 'asc'
104
+ }]
105
+ })];
106
+ case 1: return [2 /*return*/, _b.sent()];
41
107
  }
42
- },
43
- sort: [{
44
- data: 'asc'
45
- }]
108
+ });
46
109
  });
47
- }
48
- async getFeriadosElastic({ contaId, dataFinal, dataInicial }) {
49
- return await this.retornaTodosDadosPaginacaoElastic(await this.internalGetFeriadosElastic({
50
- contaId: contaId,
51
- dataFinal: dataFinal,
52
- dataInicial: dataInicial
53
- }));
54
- }
55
- }
110
+ };
111
+ FeriadosElastic.prototype.getFeriadosElastic = function (_a) {
112
+ var contaId = _a.contaId, dataFinal = _a.dataFinal, dataInicial = _a.dataInicial;
113
+ return __awaiter(this, void 0, void 0, function () {
114
+ var _b;
115
+ return __generator(this, function (_c) {
116
+ switch (_c.label) {
117
+ case 0:
118
+ _b = this.retornaTodosDadosPaginacaoElastic;
119
+ return [4 /*yield*/, this.internalGetFeriadosElastic({
120
+ contaId: contaId,
121
+ dataFinal: dataFinal,
122
+ dataInicial: dataInicial
123
+ })];
124
+ case 1: return [4 /*yield*/, _b.apply(this, [_c.sent()])];
125
+ case 2: return [2 /*return*/, _c.sent()];
126
+ }
127
+ });
128
+ });
129
+ };
130
+ return FeriadosElastic;
131
+ }(elastic_base_1.ElasticBase));
56
132
  exports.FeriadosElastic = FeriadosElastic;
@@ -1,85 +1,163 @@
1
1
  "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
2
53
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
54
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
55
  };
5
56
  Object.defineProperty(exports, "__esModule", { value: true });
6
57
  exports.JornadasElastic = void 0;
7
- const moment_1 = __importDefault(require("moment"));
8
- const elastic_base_1 = require("./elastic-base");
9
- class JornadasElastic extends elastic_base_1.ElasticBase {
10
- async internalGetJornadasElastic({ fim, inicio, contaId, empresaId, usuarioId }) {
11
- const queryMust = new Array();
12
- queryMust.push({
13
- match: {
14
- i_parent_id: contaId
15
- }
16
- });
17
- queryMust.push({
18
- match: {
19
- 'usuario.empresa.uid': empresaId
20
- }
21
- });
22
- if (usuarioId) {
23
- queryMust.push({
24
- match: {
25
- 'usuario.uid': usuarioId
58
+ var moment_1 = __importDefault(require("moment"));
59
+ var elastic_base_1 = require("./elastic-base");
60
+ var JornadasElastic = /** @class */ (function (_super) {
61
+ __extends(JornadasElastic, _super);
62
+ function JornadasElastic() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
64
+ }
65
+ JornadasElastic.prototype.internalGetJornadasElastic = function (_a) {
66
+ var fim = _a.fim, inicio = _a.inicio, contaId = _a.contaId, empresaId = _a.empresaId, usuarioId = _a.usuarioId;
67
+ return __awaiter(this, void 0, void 0, function () {
68
+ var queryMust;
69
+ return __generator(this, function (_b) {
70
+ switch (_b.label) {
71
+ case 0:
72
+ queryMust = new Array();
73
+ queryMust.push({
74
+ match: {
75
+ i_parent_id: contaId
76
+ }
77
+ });
78
+ queryMust.push({
79
+ match: {
80
+ 'usuario.empresa.uid': empresaId
81
+ }
82
+ });
83
+ if (usuarioId) {
84
+ queryMust.push({
85
+ match: {
86
+ 'usuario.uid': usuarioId
87
+ }
88
+ });
89
+ }
90
+ queryMust.push({
91
+ range: {
92
+ data_hora: {
93
+ gte: (0, moment_1.default)(inicio).format('YYYY-MM-DDTHH:mm:ss.SSS'),
94
+ lte: (0, moment_1.default)(fim).format('YYYY-MM-DDTHH:mm:ss.SSS')
95
+ }
96
+ }
97
+ });
98
+ return [4 /*yield*/, this.elasticClient.search({
99
+ scroll: '1m',
100
+ index: 'contas_jornadas',
101
+ size: this.totalRegistrosFiltradosElastic,
102
+ _source: [
103
+ 'data_hora',
104
+ 'usuario.uid',
105
+ 'usuario.cpf',
106
+ 'usuario.pis',
107
+ 'horas_extras',
108
+ 'horas_normais',
109
+ 'horas_noturnas',
110
+ 'horas_negativas',
111
+ 'jornada_prevista',
112
+ 'jornada_realizada',
113
+ 'regime_compensacao',
114
+ 'usuario.cargo.nome',
115
+ 'usuario.empresa.uf',
116
+ 'faixas_horas_extras',
117
+ 'usuario.empresa.uid',
118
+ 'marcacoes_ignoradas',
119
+ 'usuario.empresa.cnpj',
120
+ 'horas_noturnas_extras',
121
+ 'usuario.empresa.cidade',
122
+ 'horas_extras_intrajornada',
123
+ 'usuario.parametros.codigo_externo',
124
+ 'usuario.empresa.parametros.codigo_externo'
125
+ ],
126
+ query: {
127
+ bool: {
128
+ must: queryMust
129
+ }
130
+ },
131
+ sort: [{
132
+ data_hora: 'asc'
133
+ }]
134
+ })];
135
+ case 1: return [2 /*return*/, _b.sent()];
26
136
  }
27
137
  });
28
- }
29
- queryMust.push({
30
- range: {
31
- data_hora: {
32
- gte: (0, moment_1.default)(inicio).format('YYYY-MM-DDTHH:mm:ss.SSS'),
33
- lte: (0, moment_1.default)(fim).format('YYYY-MM-DDTHH:mm:ss.SSS')
34
- }
35
- }
36
138
  });
37
- return await this.elasticClient.search({
38
- scroll: '1m',
39
- index: 'contas_jornadas',
40
- size: this.totalRegistrosFiltradosElastic,
41
- _source: [
42
- 'data_hora',
43
- 'usuario.uid',
44
- 'usuario.cpf',
45
- 'usuario.pis',
46
- 'horas_extras',
47
- 'horas_normais',
48
- 'horas_noturnas',
49
- 'horas_negativas',
50
- 'jornada_prevista',
51
- 'jornada_realizada',
52
- 'regime_compensacao',
53
- 'usuario.cargo.nome',
54
- 'usuario.empresa.uf',
55
- 'faixas_horas_extras',
56
- 'usuario.empresa.uid',
57
- 'marcacoes_ignoradas',
58
- 'usuario.empresa.cnpj',
59
- 'horas_noturnas_extras',
60
- 'usuario.empresa.cidade',
61
- 'horas_extras_intrajornada',
62
- 'usuario.parametros.codigo_externo',
63
- 'usuario.empresa.parametros.codigo_externo'
64
- ],
65
- query: {
66
- bool: {
67
- must: queryMust
139
+ };
140
+ JornadasElastic.prototype.getJornadasElastic = function (_a) {
141
+ var contaId = _a.contaId, dataFinal = _a.dataFinal, usuarioId = _a.usuarioId, empresaId = _a.empresaId, dataInicial = _a.dataInicial;
142
+ return __awaiter(this, void 0, void 0, function () {
143
+ var _b;
144
+ return __generator(this, function (_c) {
145
+ switch (_c.label) {
146
+ case 0:
147
+ _b = this.retornaTodosDadosPaginacaoElastic;
148
+ return [4 /*yield*/, this.internalGetJornadasElastic({
149
+ fim: dataFinal,
150
+ contaId: contaId,
151
+ inicio: dataInicial,
152
+ empresaId: empresaId,
153
+ usuarioId: usuarioId
154
+ })];
155
+ case 1: return [4 /*yield*/, _b.apply(this, [_c.sent()])];
156
+ case 2: return [2 /*return*/, _c.sent()];
68
157
  }
69
- },
70
- sort: [{
71
- data_hora: 'asc'
72
- }]
158
+ });
73
159
  });
74
- }
75
- async getJornadasElastic({ contaId, dataFinal, usuarioId, empresaId, dataInicial }) {
76
- return await this.retornaTodosDadosPaginacaoElastic(await this.internalGetJornadasElastic({
77
- fim: dataFinal,
78
- contaId: contaId,
79
- inicio: dataInicial,
80
- empresaId: empresaId,
81
- usuarioId: usuarioId
82
- }));
83
- }
84
- }
160
+ };
161
+ return JornadasElastic;
162
+ }(elastic_base_1.ElasticBase));
85
163
  exports.JornadasElastic = JornadasElastic;