Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjntServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
zjntServer
Commits
36a7b103
Commit
36a7b103
authored
Feb 18, 2025
by
lixinming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://123.207.147.179:8888/node_server/zjntServer
parents
dfb98dfd
b333b503
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
347 additions
and
204 deletions
+347
-204
guangfu.json
res/guangfu.json
+277
-0
zjny.xlsx
res/zjny.xlsx
+0
-0
getData.ts
src/biz/getData.ts
+64
-199
dataInterface.ts
src/data/interface/dataInterface.ts
+6
-5
No files found.
res/guangfu.json
0 → 100644
View file @
36a7b103
{
"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
res/zjny.xlsx
View file @
36a7b103
No preview for this file type
src/biz/getData.ts
View file @
36a7b103
...
...
@@ -12,253 +12,118 @@ let guangfuData = {
jbqk
:
[
{
key
:
"安全运行天数"
,
value
:
426
,
value
:
62
,
},
{
key
:
"组件总功率"
,
value
:
32871
,
value
:
0
,
},
{
key
:
"设备总数"
,
value
:
15
,
value
:
0
,
},
],
nhfx
:
{
count
:
[
{
key
:
"年用电量"
,
value
:
"56279.4"
,
},
{
key
:
"光伏发电量"
,
value
:
"65262.4"
,
},
{
key
:
'年用电量'
,
value
:
'85693.7'
},
{
key
:
'光伏发电量'
,
value
:
'85872.1'
}
],
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
,
},
{
key
:
2019
,
value
:
0
},
{
key
:
2020
,
value
:
0
},
{
key
:
2021
,
value
:
0
},
{
key
:
2022
,
value
:
0
},
{
key
:
2023
,
value
:
0
},
{
key
:
2024
,
value
:
0.49
},
{
key
:
2025
,
value
:
234.78
},
],
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
,
}
{
key
:
'05:00'
,
value
:
0
},
{
key
:
'06:00'
,
value
:
74494.85272216797
},
{
key
:
'07:00'
,
value
:
1274767.62890625
},
{
key
:
'08:00'
,
value
:
3469207.8125
},
{
key
:
'09:00'
,
value
:
5133055.46875
},
{
key
:
'10:00'
,
value
:
6363192.78125
},
],
},
trsy
:
{
count
:
[
{
key
:
"光伏投入成本"
,
value
:
"123"
,
},
{
key
:
"运维成本"
,
value
:
"123"
,
},
{
key
:
"发电量"
,
value
:
"65262.4"
,
},
{
key
:
"发电时长"
,
value
:
10214.754980833333
,
},
{
key
:
'光伏投入成本'
,
value
:
'123'
},
{
key
:
'运维成本'
,
value
:
'123'
},
{
key
:
'发电量'
,
value
:
'85872.1'
},
{
key
:
'发电时长'
,
value
:
1473.6491358333333
},
],
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"
,
},
{
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
,
value
:
848
,
unit
:
""
,
},
{
key
:
"总发电量"
,
value
:
"
65262.4
"
,
value
:
"
85871.3
"
,
unit
:
"KW"
,
},
{
key
:
"实时功率"
,
value
:
13.80
,
value
:
5.800000171661377
,
unit
:
"KW"
,
},
],
xyfxfd
:
{
count
:
[
{
key
:
"今日发电"
,
value
:
"184.3"
,
},
{
key
:
"日功率"
,
value
:
0
,
},
{
key
:
"当前功率"
,
value
:
0
,
},
{
key
:
"等效小时数"
,
value
:
0
,
},
{
key
:
'今日发电'
,
value
:
'3773.4'
},
{
key
:
'日功率'
,
value
:
44926325.05975342
},
{
key
:
'当前功率'
,
value
:
2.569999933242798
},
{
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"
,
},
{
key
:
'2025-02-11'
,
value
:
'1167.9'
},
{
key
:
'2025-02-12'
,
value
:
'687.5'
},
{
key
:
'2025-02-13'
,
value
:
'3749.7'
},
{
key
:
'2025-02-14'
,
value
:
'1060.7'
},
{
key
:
'2025-02-15'
,
value
:
'364.8'
},
{
key
:
'2025-02-16'
,
value
:
'3257.1'
},
{
key
:
'2025-02-17'
,
value
:
'2940.3'
},
{
key
:
'2025-02-18'
,
value
:
'3773.6'
},
],
},
xyfx
:
{
count
:
[
{
key
:
"今日收益"
,
value
:
110.58
,
},
{
key
:
"当月收益"
,
value
:
2130.84
,
},
{
key
:
"累计收益"
,
value
:
"123"
,
},
{
key
:
'今日收益'
,
value
:
2263.62
},
{
key
:
'当月收益'
,
value
:
26519.58
},
{
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
,
},
{
key
:
'2025-02-11'
,
value
:
700.74
},
{
key
:
'2025-02-12'
,
value
:
412.5
},
{
key
:
'2025-02-13'
,
value
:
2249.8199999999997
},
{
key
:
'2025-02-14'
,
value
:
636.42
},
{
key
:
'2025-02-15'
,
value
:
218.88
},
{
key
:
'2025-02-16'
,
value
:
1954.2599999999998
},
{
key
:
'2025-02-17'
,
value
:
1764.18
},
{
key
:
'2025-02-18'
,
value
:
2264.16
},
],
"去年"
:
[
{
key
:
'2024-02-11'
,
value
:
0
},
{
key
:
'2024-02-12'
,
value
:
0
},
{
key
:
'2024-02-13'
,
value
:
0
},
{
key
:
'2024-02-14'
,
value
:
0
},
{
key
:
'2024-02-15'
,
value
:
0
},
{
key
:
'2024-02-16'
,
value
:
0
},
{
key
:
'2024-02-17'
,
value
:
0
},
{
key
:
'2024-02-18'
,
value
:
0
},
],
"去年"
:
[],
},
},
jnjp
:
{
...
...
src/data/interface/dataInterface.ts
View file @
36a7b103
...
...
@@ -70,6 +70,7 @@ export async function getGuangFu() {
end_date
:
nowYearAgo
,
time_unit
:
"year"
,
}
/** todo 接口调用频率限制---------------------------------------------------------------------------------------- */
// let pjzData:any = await get(dataCenterInterfaceConfig.hqmdzlsfdl, nhfxquery, header);
// if (!pjzData.body) console.log("接口请求失败-获取某电站历史发电量:hqmdzlsfdl");
// let nowYear = moment(nowTime).format("YYYY");
...
...
@@ -83,7 +84,7 @@ export async function getGuangFu() {
// if (date == nowYear) nhfxData.年用电量 = energy;
// })
// }
/** todo 接口调用频率限制---------------------------------------------------------------------------------------- */
//当天功率
let
query
=
{
...
...
@@ -228,19 +229,19 @@ export async function getGuangFu() {
//去年
/** todo 接口调用频率限制---------------------------------------------------------------------------------------- */
let
yearAgo
=
moment
(
).
subtract
(
1
,
'years'
);
let
yearAgo
=
moment
(
moment
().
subtract
(
1
,
'years'
)).
format
(
"YYYY"
);
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
xyfxquery
=
{
plant_id
:
systemConfig
.
plantId
,
start_date
:
startDate
,
end_date
:
endDate
,
time_unit
:
"
year
"
,
time_unit
:
"
day
"
,
}
let
hqmdzlsfdl
:
any
=
await
get
(
dataCenterInterfaceConfig
.
hqmdzlsfdl
,
xyfxquery
,
header
);
if
(
!
hqmdzlsfdl
)
throw
new
BizError
(
'数据未返回'
);
if
(
!
hqmdzlsfdl
.
body
)
console
.
log
(
"接口请求失败:hqmdzlsfdl"
);
let
lastyear
=
[];
hqmdzlsfdl
.
body
.
energys
.
forEach
(
info
=>
{
let
{
date
,
energy
}
=
info
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment