Commit b333b503 by chenjinjing

no message

parent aa7bd934
{
"jbqk": [
{
"key": "安全运行天数",
"value": 426
},
{
"key": "组件总功率",
"value": 32871
},
{
"key": "设备总数",
"value": 15
}
],
"nhfx": {
"count": [
{
"key": "年用电量",
"value": "56279.4"
},
{
"key": "光伏发电量",
"value": "65262.4"
}
],
"charData": [
{
"key": 2018,
"value": 0
},
{
"key": 2019,
"value": 0
},
{
"key": 2020,
"value": 0
},
{
"key": 2021,
"value": 0
},
{
"key": 2022,
"value": 0
},
{
"key": 2023,
"value": 24.61
},
{
"key": 2024,
"value": 154.19
}
],
"dayData": [
{
"key": "06:00",
"value": 677.2000179290771
},
{
"key": "07:00",
"value": 53791.40002441406
},
{
"key": "08:00",
"value": 177091.796875
},
{
"key": "09:00",
"value": 278128.203125
},
{
"key": "10:00",
"value": 337899.998046875
},
{
"key": "11:00",
"value": 369778.896484375
}
]
},
"trsy": {
"count": [
{
"key": "光伏投入成本",
"value": "123"
},
{
"key": "运维成本",
"value": "123"
},
{
"key": "发电量",
"value": "65262.4"
},
{
"key": "发电时长",
"value": 10214.754980833333
}
],
"charData": [
{
"key": "2016",
"value": "518"
},
{
"key": "2017",
"value": "733"
},
{
"key": "2018",
"value": "116"
},
{
"key": "2019",
"value": "634"
},
{
"key": "2020",
"value": "116"
},
{
"key": "2021",
"value": "634"
}
]
},
"ztsj": [
{
"key": "装机容量",
"value": 46,
"unit": ""
},
{
"key": "总发电量",
"value": "65262.4",
"unit": "KW"
},
{
"key": "实时功率",
"value": 13.80,
"unit": "KW"
}
],
"xyfxfd": {
"count": [
{
"key": "今日发电",
"value": "184.3"
},
{
"key": "日功率",
"value": 0
},
{
"key": "当前功率",
"value": 0
},
{
"key": "等效小时数",
"value": 0
}
],
"chartData": [
{
"key": "2024-12-22",
"value": "113"
},
{
"key": "2024-12-23",
"value": "50.9"
},
{
"key": "2024-12-24",
"value": "172.7"
},
{
"key": "2024-12-25",
"value": "69.9"
},
{
"key": "2024-12-26",
"value": "124.1"
},
{
"key": "2024-12-27",
"value": "169.1"
},
{
"key": "2024-12-28",
"value": "190"
},
{
"key": "2024-12-29",
"value": "184.3"
}
]
},
"xyfx": {
"count": [
{
"key": "今日收益",
"value": 110.58
},
{
"key": "当月收益",
"value": 2130.84
},
{
"key": "累计收益",
"value": "123"
}
],
"chartData": {
"今年": [
{
"key": "2024-12-22",
"value": 67.8
},
{
"key": "2024-12-23",
"value": 30.54
},
{
"key": "2024-12-24",
"value": 103.61999999999999
},
{
"key": "2024-12-25",
"value": 41.940000000000005
},
{
"key": "2024-12-26",
"value": 74.46
},
{
"key": "2024-12-27",
"value": 101.46
},
{
"key": "2024-12-28",
"value": 114
},
{
"key": "2024-12-29",
"value": 110.58
}
],
"去年": []
}
},
"jnjp": {
"count": [
{
"key": "二氧化碳",
"value": "832克/千瓦时"
},
{
"key": "氮氧化物",
"value": "0.179克/千瓦时"
},
{
"key": "二氧化硫",
"value": "0.16克/千瓦时"
},
{
"key": "电力烟尘",
"value": "0.032克/千瓦时"
}
],
"chartData": [
]
}
}
\ No newline at end of file
No preview for this file type
...@@ -12,253 +12,118 @@ let guangfuData = { ...@@ -12,253 +12,118 @@ let guangfuData = {
jbqk: [ jbqk: [
{ {
key: "安全运行天数", key: "安全运行天数",
value: 426, value: 62,
}, },
{ {
key: "组件总功率", key: "组件总功率",
value: 32871, value: 0,
}, },
{ {
key: "设备总数", key: "设备总数",
value: 15, value: 0,
}, },
], ],
nhfx: { nhfx: {
count: [ count: [
{ {key: '年用电量', value: '85693.7'},
key: "年用电量", {key: '光伏发电量', value: '85872.1'}
value: "56279.4",
},
{
key: "光伏发电量",
value: "65262.4",
},
], ],
charData: [ charData: [
{ {key: 2019, value: 0},
key: 2018, {key: 2020, value: 0},
value: 0, {key: 2021, value: 0},
}, {key: 2022, value: 0},
{ {key: 2023, value: 0},
key: 2019, {key: 2024, value: 0.49},
value: 0, {key: 2025, value: 234.78},
},
{
key: 2020,
value: 0,
},
{
key: 2021,
value: 0,
},
{
key: 2022,
value: 0,
},
{
key: 2023,
value: 24.61,
},
{
key: 2024,
value: 154.19,
},
], ],
dayData: [ dayData: [
{ {key: '05:00', value: 0},
key: "06:00", {key: '06:00', value: 74494.85272216797},
value: 677.2000179290771, {key: '07:00', value: 1274767.62890625},
}, {key: '08:00', value: 3469207.8125},
{ {key: '09:00', value: 5133055.46875},
key: "07:00", {key: '10:00', value: 6363192.78125},
value: 53791.40002441406,
},
{
key: "08:00",
value: 177091.796875,
},
{
key: "09:00",
value: 278128.203125,
},
{
key: "10:00",
value: 337899.998046875,
},
{
key: "11:00",
value: 369778.896484375,
}
], ],
}, },
trsy: { trsy: {
count: [ count: [
{ {key: '光伏投入成本', value: '123'},
key: "光伏投入成本", {key: '运维成本', value: '123'},
value: "123", {key: '发电量', value: '85872.1'},
}, {key: '发电时长', value: 1473.6491358333333},
{
key: "运维成本",
value: "123",
},
{
key: "发电量",
value: "65262.4",
},
{
key: "发电时长",
value: 10214.754980833333,
},
], ],
charData: [ charData: [
{ {key: '2016', value: '518'},
key: "2016", {key: '2017', value: '733'},
value: "518", {key: '2018', value: '116'},
}, {key: '2019', value: '634'},
{ {key: '2020', value: '116'},
key: "2017", {key: '2021', value: '634'}
value: "733",
},
{
key: "2018",
value: "116",
},
{
key: "2019",
value: "634",
},
{
key: "2020",
value: "116",
},
{
key: "2021",
value: "634",
},
], ],
}, },
ztsj: [ ztsj: [
{ {
key: "装机容量", key: "装机容量",
value: 46, value: 848,
unit: "", unit: "",
}, },
{ {
key: "总发电量", key: "总发电量",
value: "65262.4", value: "85871.3",
unit: "KW", unit: "KW",
}, },
{ {
key: "实时功率", key: "实时功率",
value: 13.80, value: 5.800000171661377,
unit: "KW", unit: "KW",
}, },
], ],
xyfxfd: { xyfxfd: {
count: [ count: [
{ {key: '今日发电', value: '3773.4'},
key: "今日发电", {key: '日功率', value: 44926325.05975342},
value: "184.3", {key: '当前功率', value: 2.569999933242798},
}, {key: '等效小时数', value: 0},
{
key: "日功率",
value: 0,
},
{
key: "当前功率",
value: 0,
},
{
key: "等效小时数",
value: 0,
},
], ],
chartData: [ chartData: [
{ {key: '2025-02-11', value: '1167.9'},
key: "2024-12-22", {key: '2025-02-12', value: '687.5'},
value: "113", {key: '2025-02-13', value: '3749.7'},
}, {key: '2025-02-14', value: '1060.7'},
{ {key: '2025-02-15', value: '364.8'},
key: "2024-12-23", {key: '2025-02-16', value: '3257.1'},
value: "50.9", {key: '2025-02-17', value: '2940.3'},
}, {key: '2025-02-18', value: '3773.6'},
{
key: "2024-12-24",
value: "172.7",
},
{
key: "2024-12-25",
value: "69.9",
},
{
key: "2024-12-26",
value: "124.1",
},
{
key: "2024-12-27",
value: "169.1",
},
{
key: "2024-12-28",
value: "190",
},
{
key: "2024-12-29",
value: "184.3",
},
], ],
}, },
xyfx: { xyfx: {
count: [ count: [
{ {key: '今日收益', value: 2263.62},
key: "今日收益", {key: '当月收益', value: 26519.58},
value: 110.58, {key: '累计收益', value: '123'},
},
{
key: "当月收益",
value: 2130.84,
},
{
key: "累计收益",
value: "123",
},
], ],
chartData: { chartData: {
"今年": [ "今年": [
{ {key: '2025-02-11', value: 700.74},
key: "2024-12-22", {key: '2025-02-12', value: 412.5},
value: 67.8, {key: '2025-02-13', value: 2249.8199999999997},
}, {key: '2025-02-14', value: 636.42},
{ {key: '2025-02-15', value: 218.88},
key: "2024-12-23", {key: '2025-02-16', value: 1954.2599999999998},
value: 30.54, {key: '2025-02-17', value: 1764.18},
}, {key: '2025-02-18', value: 2264.16},
{ ],
key: "2024-12-24", "去年": [
value: 103.61999999999999, {key: '2024-02-11', value: 0},
}, {key: '2024-02-12', value: 0},
{ {key: '2024-02-13', value: 0},
key: "2024-12-25", {key: '2024-02-14', value: 0},
value: 41.940000000000005, {key: '2024-02-15', value: 0},
}, {key: '2024-02-16', value: 0},
{ {key: '2024-02-17', value: 0},
key: "2024-12-26", {key: '2024-02-18', value: 0},
value: 74.46,
},
{
key: "2024-12-27",
value: 101.46,
},
{
key: "2024-12-28",
value: 114,
},
{
key: "2024-12-29",
value: 110.58,
},
], ],
"去年": [],
}, },
}, },
jnjp: { jnjp: {
......
...@@ -67,6 +67,7 @@ export async function getGuangFu() { ...@@ -67,6 +67,7 @@ export async function getGuangFu() {
end_date:nowYearAgo, end_date:nowYearAgo,
time_unit:"year", time_unit:"year",
} }
/** todo 接口调用频率限制---------------------------------------------------------------------------------------- */
// let pjzData:any = await get(dataCenterInterfaceConfig.hqmdzlsfdl, nhfxquery, header); // let pjzData:any = await get(dataCenterInterfaceConfig.hqmdzlsfdl, nhfxquery, header);
// if (!pjzData.body) console.log("接口请求失败-获取某电站历史发电量:hqmdzlsfdl"); // if (!pjzData.body) console.log("接口请求失败-获取某电站历史发电量:hqmdzlsfdl");
// let nowYear = moment(nowTime).format("YYYY"); // let nowYear = moment(nowTime).format("YYYY");
...@@ -80,7 +81,7 @@ export async function getGuangFu() { ...@@ -80,7 +81,7 @@ export async function getGuangFu() {
// if (date == nowYear) nhfxData.年用电量 = energy; // if (date == nowYear) nhfxData.年用电量 = energy;
// }) // })
// } // }
/** todo 接口调用频率限制---------------------------------------------------------------------------------------- */
//当天功率 //当天功率
let query = { let query = {
...@@ -225,18 +226,18 @@ export async function getGuangFu() { ...@@ -225,18 +226,18 @@ export async function getGuangFu() {
//去年 //去年
/** todo 接口调用频率限制---------------------------------------------------------------------------------------- */ /** todo 接口调用频率限制---------------------------------------------------------------------------------------- */
let yearAgo = moment().subtract(1, 'years'); let yearAgo = moment(moment().subtract(1, 'years')).format("YYYY");
let dayAgo = moment().subtract(7, 'days'); let dayAgo = moment().subtract(7, 'days');
let startDate = `${yearAgo}-${moment(dayAgo).format("-MM-DD")}`; let startDate = `${yearAgo}-${moment(dayAgo).format("MM-DD")}`;
let endDate = `${yearAgo}-${moment(nowTime).format("MM-DD")}`; let endDate = `${yearAgo}-${moment(nowTime).format("MM-DD")}`;
let xyfxquery = { let xyfxquery = {
plant_id:systemConfig.plantId, plant_id:systemConfig.plantId,
start_date:startDate, start_date:startDate,
end_date:endDate, end_date:endDate,
time_unit:"year", time_unit:"day",
} }
let hqmdzlsfdl:any = await get(dataCenterInterfaceConfig.hqmdzlsfdl, xyfxquery, header); let hqmdzlsfdl:any = await get(dataCenterInterfaceConfig.hqmdzlsfdl, xyfxquery, header);
if (!hqmdzlsfdl) throw new BizError('数据未返回'); if (!hqmdzlsfdl.body) console.log("接口请求失败:hqmdzlsfdl");
let lastyear = []; let lastyear = [];
hqmdzlsfdl.body.energys.forEach( info => { hqmdzlsfdl.body.energys.forEach( info => {
let {date, energy} = info; let {date, energy} = info;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment