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
c7f5be7c
Commit
c7f5be7c
authored
Aug 22, 2022
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
bc3697bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
77 deletions
+8
-77
data.ts
src/biz/jgfwnl/data.ts
+7
-70
interfaceService.ts
src/data/interface/interfaceService.ts
+1
-7
No files found.
src/biz/jgfwnl/data.ts
View file @
c7f5be7c
...
...
@@ -56,85 +56,22 @@ export async function getCSGK(req, res) {
export
async
function
getCSFX
(
req
,
res
)
{
let
ret
:
any
=
{};
let
月度测试里程分布测试
data
=
[
{
key
:
"2020.8"
,
value
:
"546km"
},
{
key
:
"2020.9"
,
value
:
"124km"
},
{
key
:
"2020.10"
,
value
:
"791km"
},
{
key
:
"2020.11"
,
value
:
"135km"
},
{
key
:
"2020.12"
,
value
:
"264km"
},
{
key
:
"2021.1"
,
value
:
"546km"
},
{
key
:
"2021.2"
,
value
:
"124km"
},
{
key
:
"2021.3"
,
value
:
"791km"
},
{
key
:
"2021.4"
,
value
:
"135km"
},
{
key
:
"2021.5"
,
value
:
"264km"
},
{
key
:
"2021.6"
,
value
:
"485km"
},
{
key
:
"2021.7"
,
value
:
"362km"
},
{
key
:
"2021.8"
,
value
:
"132km"
},
{
key
:
"2021.9"
,
value
:
"783km"
},
{
key
:
"2021.10"
,
value
:
"459km"
},
{
key
:
"2021.11"
,
value
:
"631km"
},
{
key
:
"2021.12"
,
value
:
"587km"
},
{
key
:
"2022.1"
,
value
:
"486km"
},
{
key
:
"2022.2"
,
value
:
"898km"
},
{
key
:
"2022.3"
,
value
:
"213km"
},
{
key
:
"2022.4"
,
value
:
"765km"
},
{
key
:
"2022.5"
,
value
:
"456km"
},
{
key
:
"2022.6"
,
value
:
"913km"
},
{
key
:
"2022.7"
,
value
:
"566km"
},
{
key
:
"2022.8"
,
value
:
"311km"
}
];
let
月度测试里程分布功能测试
data
=
[
{
key
:
"2020.8"
,
value
:
"546km"
},
{
key
:
"2020.9"
,
value
:
"124km"
},
{
key
:
"2020.10"
,
value
:
"791km"
},
{
key
:
"2020.11"
,
value
:
"135km"
},
{
key
:
"2020.12"
,
value
:
"264km"
},
{
key
:
"2021.1"
,
value
:
"460km"
},
{
key
:
"2021.2"
,
value
:
"240km"
},
{
key
:
"2021.3"
,
value
:
"901km"
},
{
key
:
"2021.4"
,
value
:
"350km"
},
{
key
:
"2021.5"
,
value
:
"640km"
},
{
key
:
"2021.6"
,
value
:
"850km"
},
{
key
:
"2021.7"
,
value
:
"602km"
},
{
key
:
"2021.8"
,
value
:
"320km"
},
{
key
:
"2021.9"
,
value
:
"830km"
},
{
key
:
"2021.10"
,
value
:
"509km"
},
{
key
:
"2021.11"
,
value
:
"310km"
},
{
key
:
"2021.12"
,
value
:
"870km"
},
{
key
:
"2022.1"
,
value
:
"860km"
},
{
key
:
"2022.2"
,
value
:
"980km"
},
{
key
:
"2022.3"
,
value
:
"103km"
},
{
key
:
"2022.4"
,
value
:
"650km"
},
{
key
:
"2022.5"
,
value
:
"560km"
},
{
key
:
"2022.6"
,
value
:
"130km"
},
{
key
:
"2022.7"
,
value
:
"606km"
},
{
key
:
"2022.8"
,
value
:
"171km"
}
];
let
月度测试时长分布测试
data
=
[
{
key
:
"2020.8"
,
value
:
"546h"
},
{
key
:
"2020.9"
,
value
:
"124h"
},
{
key
:
"2020.10"
,
value
:
"791h"
},
{
key
:
"2020.11"
,
value
:
"135h"
},
{
key
:
"2020.12"
,
value
:
"264h"
},
{
key
:
"2021.1"
,
value
:
"546h"
},
{
key
:
"2021.2"
,
value
:
"124h"
},
{
key
:
"2021.3"
,
value
:
"791h"
},
{
key
:
"2021.4"
,
value
:
"135h"
},
{
key
:
"2021.5"
,
value
:
"264h"
},
{
key
:
"2021.6"
,
value
:
"485h"
},
{
key
:
"2021.7"
,
value
:
"362h"
},
{
key
:
"2021.8"
,
value
:
"132h"
},
{
key
:
"2021.9"
,
value
:
"783h"
},
{
key
:
"2021.10"
,
value
:
"459h"
},
{
key
:
"2021.11"
,
value
:
"631h"
},
{
key
:
"2021.12"
,
value
:
"587h"
},
{
key
:
"2022.1"
,
value
:
"486h"
},
{
key
:
"2022.2"
,
value
:
"898h"
},
{
key
:
"2022.3"
,
value
:
"213h"
},
{
key
:
"2022.4"
,
value
:
"765h"
},
{
key
:
"2022.5"
,
value
:
"456h"
},
{
key
:
"2022.6"
,
value
:
"913h"
},
{
key
:
"2022.7"
,
value
:
"566h"
},
{
key
:
"2022.8"
,
value
:
"311h"
}
];
let
月度测试时长分布功能测试
data
=
[
{
key
:
"2020.8"
,
value
:
"546h"
},
{
key
:
"2020.9"
,
value
:
"124h"
},
{
key
:
"2020.10"
,
value
:
"791h"
},
{
key
:
"2020.11"
,
value
:
"135h"
},
{
key
:
"2020.12"
,
value
:
"264h"
},
{
key
:
"2021.1"
,
value
:
"460h"
},
{
key
:
"2021.2"
,
value
:
"240h"
},
{
key
:
"2021.3"
,
value
:
"901h"
},
{
key
:
"2021.4"
,
value
:
"350h"
},
{
key
:
"2021.5"
,
value
:
"640h"
},
{
key
:
"2021.6"
,
value
:
"850h"
},
{
key
:
"2021.7"
,
value
:
"602h"
},
{
key
:
"2021.8"
,
value
:
"320h"
},
{
key
:
"2021.9"
,
value
:
"830h"
},
{
key
:
"2021.10"
,
value
:
"509h"
},
{
key
:
"2021.11"
,
value
:
"310h"
},
{
key
:
"2021.12"
,
value
:
"870h"
},
{
key
:
"2022.1"
,
value
:
"860h"
},
{
key
:
"2022.2"
,
value
:
"980h"
},
{
key
:
"2022.3"
,
value
:
"103h"
},
{
key
:
"2022.4"
,
value
:
"650h"
},
{
key
:
"2022.5"
,
value
:
"560h"
},
{
key
:
"2022.6"
,
value
:
"130h"
},
{
key
:
"2022.7"
,
value
:
"606h"
},
{
key
:
"2022.8"
,
value
:
"171h"
}
];
let
企业测试里程测试分布
data
=
[
{
key
:
"百度"
,
value
:
"46km"
},
{
key
:
"滴滴"
,
value
:
"59km"
},
{
key
:
"阿里"
,
value
:
"86km"
},
{
key
:
"丰田"
,
value
:
"71km"
},
{
key
:
"大众"
,
value
:
"59km"
},
{
key
:
"商汤"
,
value
:
"56km"
},
{
key
:
"AutoX"
,
value
:
"43km"
},
{
key
:
"小马易车"
,
value
:
"36km"
},
{
key
:
"上汽红岩"
,
value
:
"67km"
},
{
key
:
"阿利昂斯"
,
value
:
"17km"
},
{
key
:
"宝马"
,
value
:
"42km"
},
{
key
:
"吉利汽车"
,
value
:
"11km"
},
{
key
:
"上汽通用"
,
value
:
"67km"
},
{
key
:
"图森未来"
,
value
:
"53km"
}
];
let
企业测试里程功能测试分布
data
=
[
{
key
:
"百度"
,
value
:
"39km"
},
{
key
:
"滴滴"
,
value
:
"43km"
},
{
key
:
"阿里"
,
value
:
"71km"
},
{
key
:
"丰田"
,
value
:
"51km"
},
{
key
:
"大众"
,
value
:
"53km"
},
{
key
:
"商汤"
,
value
:
"46km"
},
{
key
:
"AutoX"
,
value
:
"33km"
},
{
key
:
"小马易车"
,
value
:
"26km"
},
{
key
:
"上汽红岩"
,
value
:
"47km"
},
{
key
:
"阿利昂斯"
,
value
:
"27km"
},
{
key
:
"宝马"
,
value
:
"70km"
},
{
key
:
"吉利汽车"
,
value
:
"75km"
},
{
key
:
"上汽通用"
,
value
:
"67km"
},
{
key
:
"图森未来"
,
value
:
"72km"
}
];
let
企业测试时长测试分布
data
=
[
{
key
:
"百度"
,
value
:
"61h"
},
{
key
:
"滴滴"
,
value
:
"48h"
},
{
key
:
"阿里"
,
value
:
"78h"
},
{
key
:
"丰田"
,
value
:
"71h"
},
{
key
:
"大众"
,
value
:
"59h"
},
{
key
:
"商汤"
,
value
:
"56h"
},
{
key
:
"AutoX"
,
value
:
"53h"
},
{
key
:
"小马易车"
,
value
:
"37h"
},
{
key
:
"上汽红岩"
,
value
:
"67h"
},
{
key
:
"阿利昂斯"
,
value
:
"17km"
},
{
key
:
"宝马"
,
value
:
"42km"
},
{
key
:
"吉利汽车"
,
value
:
"11km"
},
{
key
:
"上汽通用"
,
value
:
"67km"
},
{
key
:
"图森未来"
,
value
:
"53km"
}
];
let
企业测试时长功能测试分布
data
=
[
{
key
:
"百度"
,
value
:
"66h"
},
{
key
:
"滴滴"
,
value
:
"43h"
},
{
key
:
"阿里"
,
value
:
"63h"
},
{
key
:
"丰田"
,
value
:
"51h"
},
{
key
:
"大众"
,
value
:
"53h"
},
{
key
:
"商汤"
,
value
:
"46h"
},
{
key
:
"AutoX"
,
value
:
"63h"
},
{
key
:
"小马易车"
,
value
:
"26h"
},
{
key
:
"上汽红岩"
,
value
:
"47h"
},
{
key
:
"阿利昂斯"
,
value
:
"27km"
},
{
key
:
"宝马"
,
value
:
"70km"
},
{
key
:
"吉利汽车"
,
value
:
"75km"
},
{
key
:
"上汽通用"
,
value
:
"67km"
},
{
key
:
"图森未来"
,
value
:
"72km"
}
];
let
{
testMileage
,
functionTestMileage
,
testMileageEnterprise
,
functionTestMileageEnterprise
}
=
await
getTestAnalysis
();
let
月度测试里程分布
data
=
{
测试
:
{
unit
:
'km'
,
dataInfo
:
testMileage
},
功能测试
:
{
unit
:
'km'
,
dataInfo
:
functionTestMileage
}};
ret
[
"api1"
]
=
getChartOutData
(
"月度测试里程分布"
,
月度测试里程分布
data
);
//
let {月度测试时长data, 企业测试时长data} = await getTestTotalTime();
let
{
月度测试时长
data
,
企业测试时长
data
}
=
await
getTestTotalTime
();
//
let {testTime, functionTestTime} = 月度测试时长data;
//
let 月度测试时长分布data = {测试: {unit:'h', dataInfo: testTime}, 功能测试: {unit:'h', dataInfo: functionTestTime}};
//
ret["api2"] = getChartOutData("月度测试时长分布", 月度测试时长分布data);
let
{
testTime
,
functionTestTime
}
=
月度测试时长
data
;
let
月度测试时长分布
data
=
{
测试
:
{
unit
:
'h'
,
dataInfo
:
testTime
},
功能测试
:
{
unit
:
'h'
,
dataInfo
:
functionTestTime
}};
ret
[
"api2"
]
=
getChartOutData
(
"月度测试时长分布"
,
月度测试时长分布
data
);
let
企业测试里程分布
data
=
{
测试
:
{
unit
:
'km'
,
dataInfo
:
testMileageEnterprise
},
功能测试
:
{
unit
:
'km'
,
dataInfo
:
functionTestMileageEnterprise
}};
ret
[
"api3"
]
=
getChartOutData
(
"企业测试里程分布"
,
企业测试里程分布
data
);
// let {testTimeEnterprise, functionTestTimeEnterprise} = 企业测试时长data;
// let 企业测试时长分布data = {测试: {unit:'h', dataInfo: testTimeEnterprise}, 功能测试: {unit:'h', dataInfo: functionTestTimeEnterprise}};
// ret["api4"] = getChartOutData("企业测试时长分布", 企业测试时长分布data);
// let 企业脱离自动驾驶比率data:any = [
// {"企业名称":"滴滴", "次数":"29次", "里程":"139公里"},
// {"企业名称":"商汤", "次数":"2次", "里程":"261公里"},
// {"企业名称":"小马易车", "次数":"12次", "里程":"231公里"},
// {"企业名称":"仙途", "次数":"10次", "里程":"176公里"},
// {"企业名称":"上汽红岩", "次数":"21次", "里程":"139公里"},
// {"企业名称":"初速度", "次数":"33次", "里程":"214公里"},
// {"企业名称":"AutoX", "次数":"29次", "里程":"93公里"},
// {"企业名称":"中车时代", "次数":"27次", "里程":"163公里"},
// {"企业名称":"丰田", "次数":"17次", "里程":"139公里"},
// {"企业名称":"大众", "次数":"19次", "里程":"93公里"},
// {"企业名称":"宝马", "次数":"10次", "里程":"176公里"}
// ]
let
{
testTimeEnterprise
,
functionTestTimeEnterprise
}
=
企业测试时长
data
;
let
企业测试时长分布
data
=
{
测试
:
{
unit
:
'h'
,
dataInfo
:
testTimeEnterprise
},
功能测试
:
{
unit
:
'h'
,
dataInfo
:
functionTestTimeEnterprise
}};
ret
[
"api4"
]
=
getChartOutData
(
"企业测试时长分布"
,
企业测试时长分布
data
);
let
企业脱离自动驾驶比率
data
=
await
getDetachmentRatio
();
...
...
src/data/interface/interfaceService.ts
View file @
c7f5be7c
...
...
@@ -127,7 +127,7 @@ export async function getDetachmentRatio() {
for
(
let
key
in
distinctMap
)
{
let
{
enterprise
,
disengagement
,
autoMileage
}
=
distinctMap
[
key
];
返回结果
.
push
({
"企业名称"
:
enterprise
,
"里程"
:
autoMileage
,
"次数"
:
disengagement
});
返回结果
.
push
({
"企业名称"
:
enterprise
,
"里程"
:
autoMileage
+
"公里"
,
"次数"
:
disengagement
+
"次"
});
}
return
返回结果
;
...
...
@@ -396,9 +396,3 @@ async function getInterfaceData(st, et, index) {
throw
new
SysError
(
SYSTEMERRORENUM
.
获取第三方接口数据失败
,
interfaceUrl
,
JSON
.
stringify
(
body
)
);
}
}
function
getPreMonthDay
(
index
)
{
let
newDateArr
;
let
whereDateArr
;
return
{
newDateArr
,
whereDateArr
}
}
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