commit
This commit is contained in:
commit
b5ca2d50ac
337 changed files with 24672 additions and 0 deletions
83
dist/GEE/Escopo2/eletricidadeLocal/eletricidadeLocSIN.js
vendored
Normal file
83
dist/GEE/Escopo2/eletricidadeLocal/eletricidadeLocSIN.js
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.fontesEscopo2EletricidadeLoc2 = void 0;
|
||||
const resposta_1 = require("../../../resposta");
|
||||
const listaFatorAno_1 = require("../../ListasFatoresEmissao/listaFatorAno");
|
||||
const listaRodoviarioMes_1 = require("../../ListasFatoresEmissao/listaRodoviarioMes");
|
||||
const interfaces_1 = require("../../interfaces");
|
||||
exports.fontesEscopo2EletricidadeLoc2 = {
|
||||
escopo: "Escopo2",
|
||||
idTipoFonte: "EletricidadeLocSin",
|
||||
descricao: "Eletricidade Localização SIN",
|
||||
estruturaCadastro: [
|
||||
{
|
||||
idCampo: "descricao",
|
||||
descricao: "Descrição da Fonte",
|
||||
tipo: interfaces_1.tiposCamposGee.texto,
|
||||
},
|
||||
],
|
||||
estruturaRegistro: [
|
||||
{
|
||||
campo: "eletricidade",
|
||||
descricao: "Eletricidade Comprada (MWh)",
|
||||
tipo: interfaces_1.tiposCamposGee.numero,
|
||||
},
|
||||
],
|
||||
formula: ({ cad, reg, inventario, fonte, registro }) => {
|
||||
const desc = cad.descricao;
|
||||
if (!desc) {
|
||||
return resposta_1.respostaCM.addErro("não foi encontrado descrição");
|
||||
}
|
||||
let FESIN = 0;
|
||||
const mesAno = fonte.quantidadeRegistros;
|
||||
if (mesAno == 1) {
|
||||
FESIN = listaFatorAno_1.listaFatorAno[Number(inventario.anoInventario) - 2000].feSin;
|
||||
}
|
||||
const periodo = Number((registro.periodoInicio || "").split("-")[1]);
|
||||
const rodoMes = listaRodoviarioMes_1.listaRodoviarioMes.find((a) => a.ano == Number(inventario.anoInventario));
|
||||
if (!rodoMes) {
|
||||
return resposta_1.respostaCM.addErro("Problema na listagem de ano de inventário");
|
||||
}
|
||||
if (mesAno != 1) {
|
||||
if (periodo == 1) {
|
||||
FESIN = rodoMes.fesinJan;
|
||||
}
|
||||
if (periodo == 2) {
|
||||
FESIN = rodoMes.fesinFev;
|
||||
}
|
||||
if (periodo == 3) {
|
||||
FESIN = rodoMes.fesinMar;
|
||||
}
|
||||
if (periodo == 4) {
|
||||
FESIN = rodoMes.fesinAbr;
|
||||
}
|
||||
if (periodo == 5) {
|
||||
FESIN = rodoMes.fesinMai;
|
||||
}
|
||||
if (periodo == 6) {
|
||||
FESIN = rodoMes.fesinJun;
|
||||
}
|
||||
if (periodo == 7) {
|
||||
FESIN = rodoMes.fesinJul;
|
||||
}
|
||||
if (periodo == 8) {
|
||||
FESIN = rodoMes.fesinAgo;
|
||||
}
|
||||
if (periodo == 9) {
|
||||
FESIN = rodoMes.fesinSet;
|
||||
}
|
||||
if (periodo == 10) {
|
||||
FESIN = rodoMes.fesinOut;
|
||||
}
|
||||
if (periodo == 11) {
|
||||
FESIN = rodoMes.fesinNov;
|
||||
}
|
||||
if (periodo == 12) {
|
||||
FESIN = rodoMes.fesinDez;
|
||||
}
|
||||
}
|
||||
const carbono = Number(reg.eletricidade) * FESIN;
|
||||
return resposta_1.respostaCM.addResultado([carbono, null]);
|
||||
},
|
||||
};
|
||||
//# sourceMappingURL=eletricidadeLocSIN.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue