Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
server
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
changsanjiao
server
Commits
db31d0de
Commit
db31d0de
authored
Apr 06, 2023
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
0f329ba6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
cdssfzjk.ts
src/data/interface/cdssfzjk.ts
+6
-1
sqjjhl.ts
src/data/interface/sqjjhl.ts
+1
-1
main.ts
src/main.ts
+1
-1
No files found.
src/data/interface/cdssfzjk.ts
View file @
db31d0de
...
...
@@ -3,8 +3,13 @@ import { getInterfaceByInterfaceName } from "./cronJob";
export
async
function
getCdssfzjk
()
{
let
interfaceName
=
"绿色电力充电设施发展监控"
;
let
{
chargingFacilities
,
realTimeMonitoring
,
monthlyService
}
=
await
getInterfaceByInterfaceName
(
interfaceName
);
//
let {chargingFacilities, realTimeMonitoring, monthlyService} = await getInterfaceByInterfaceName(interfaceName);
// --------------test---------------------
let
chargingFacilities
:
any
=
{};
let
realTimeMonitoring
:
any
=
{};
let
monthlyService
=
[{
"dateTime"
:
"202202"
,
"frequency"
:
11081
},
{
"dateTime"
:
"202203"
,
"frequency"
:
9480
},
{
"dateTime"
:
"202204"
,
"frequency"
:
2833
},
{
"dateTime"
:
"202205"
,
"frequency"
:
4830
},
{
"dateTime"
:
"202206"
,
"frequency"
:
16926
}];
if
(
JSON
.
stringify
(
chargingFacilities
)
===
'{}'
)
chargingFacilities
=
{
chargingStationNumber
:
0
,
chargingPileNumber
:
0
,
prioritiesInTheSite
:
0
};
if
(
JSON
.
stringify
(
realTimeMonitoring
)
===
'{}'
)
realTimeMonitoring
=
{
theTotalChargeOn
:
0
,
totalCharge
:
0
,
chargeAmount
:
0
};
if
(
!
chargingFacilities
)
throw
new
BizError
(
`
${
interfaceName
}
缺少参数 chargingFacilities`
);
...
...
src/data/interface/sqjjhl.ts
View file @
db31d0de
...
...
@@ -112,7 +112,7 @@ function getKeyBusinessDistrictIndex(dataList) {
lastYearData
[
businessName
]
=
lastYear
;
yoyGrowthData
[
businessName
]
=
yoyGrowth
;
})
dataInfo
=
{
'202
1年'
:
lastYearData
,
'2022年'
:
currYearData
,
'2022
年同比增长'
:
yoyGrowthData
};
dataInfo
=
{
'202
2年'
:
lastYearData
,
'2023年'
:
currYearData
,
'2023
年同比增长'
:
yoyGrowthData
};
return
dataInfo
;
}
...
...
src/main.ts
View file @
db31d0de
...
...
@@ -5,7 +5,7 @@ import { getPort } from "./serverConfig";
async
function
lanuch
()
{
await
initInterfaceData
();
//
await initInterfaceData();
httpServer
.
createServer
(
getPort
());
console
.
log
(
'This indicates that the server is started successfully.'
);
}
...
...
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