Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
motorCity
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
motorCity
Commits
9e0a5868
Commit
9e0a5868
authored
Aug 15, 2022
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
c74f979d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
2 deletions
+81
-2
data.ts
src/biz/jgfwnl/data.ts
+75
-0
main.ts
src/main.ts
+2
-2
router.ts
src/routers/router.ts
+4
-0
No files found.
src/biz/jgfwnl/data.ts
View file @
9e0a5868
...
...
@@ -211,4 +211,78 @@ export async function getCSFX(req, res) {
ret
[
"api5"
]
=
getListOutData
(
"企业脱离自动驾驶比率"
,
企业测试自动驾驶比率
Info
);
res
.
send
(
ret
);
}
export
async
function
mapData
(
req
,
res
)
{
//地图数据结构
let
ret
:
any
=
{};
let
基础数据
data
=
{
"摄像头"
:
"57"
,
"OBU"
:
"68"
,
"激光雷达"
:
"48"
,
"RSU"
:
"76"
,
"SIBOX"
:
"89"
};
ret
[
"base"
]
=
getKeyValueNumberOutData
(
"计算云资源"
,
基础数据
data
);
ret
[
"map"
]
=
{
rlList
:[
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
0
,
},
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
1
,
}
],
LIDARList
:[
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
0
,
},
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
1
,
}
],
MMWList
:[
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
0
,
},
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
1
,
}
],
RSUList
:[
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
0
,
},
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
1
,
}
],
SIBOXList
:[
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
0
,
},
{
latitude
:
123.1
,
longitude
:
123.1
,
state
:
1
,
}
]
};
res
.
send
(
ret
);
}
\ No newline at end of file
src/main.ts
View file @
9e0a5868
...
...
@@ -10,8 +10,8 @@ async function lanuch() {
httpServer
.
createServer
(
port
);
// await initData();
console
.
log
(
'This indicates that the server is started successfully.'
);
await
getCsgkDayData
();
//
await getTestLicense();
//
await getCsgkDayData();
await
getTestLicense
();
console
.
log
(
"初始化成功"
);
}
...
...
src/routers/router.ts
View file @
9e0a5868
...
...
@@ -24,6 +24,7 @@ export function setRouter(httpServer){
httpServer
.
post
(
'/jgfwnl_clcszl'
,
asyncHandler
(
jgfwnl_clcszlBiz
.
getData
));
httpServer
.
post
(
'/jgfwnl_RSUfsl'
,
asyncHandler
(
jgfwnl_RSUfslBiz
.
getData
));
//新版本
httpServer
.
get
(
'/yzy'
,
asyncHandler
(
jgfwnlBiz
.
getYZY
));
httpServer
.
get
(
'/csgk'
,
asyncHandler
(
jgfwnlBiz
.
getCSGK
));
httpServer
.
get
(
'/csfx'
,
asyncHandler
(
jgfwnlBiz
.
getCSFX
));
...
...
@@ -32,4 +33,6 @@ export function setRouter(httpServer){
httpServer
.
post
(
'/csgk'
,
asyncHandler
(
jgfwnlBiz
.
getCSGK
));
httpServer
.
post
(
'/csfx'
,
asyncHandler
(
jgfwnlBiz
.
getCSFX
));
httpServer
.
post
(
'/mapdata'
,
asyncHandler
(
jgfwnlBiz
.
mapData
));
}
\ No newline at end of file
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