Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyiViewServer
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
yuyiViewServer
Commits
5785408d
Commit
5785408d
authored
Apr 21, 2025
by
Zllgogo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
996c87f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
qyszhx.ts
src/data/db/qyszhx.ts
+3
-2
zhyy.ts
src/data/db/zhyy.ts
+20
-19
No files found.
src/data/db/qyszhx.ts
View file @
5785408d
...
@@ -122,7 +122,8 @@ export async function getQyszhx(eId) {
...
@@ -122,7 +122,8 @@ export async function getQyszhx(eId) {
};
};
if
(
企业基础信息
.
logonTime
)
qyjbsj
.
注册时间
=
moment
(
企业基础信息
.
logonTime
).
format
(
"YYYY-MM-DD"
)
if
(
企业基础信息
.
logonTime
)
qyjbsj
.
注册时间
=
moment
(
企业基础信息
.
logonTime
).
format
(
"YYYY-MM-DD"
)
if
(
企业孵化信息
[
0
].
enterprise_fuhuas
[
0
].
startTime
)
qyjbsj
.
首次入孵时间
=
moment
(
企业孵化信息
[
0
].
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)
if
(
企业孵化信息
[
0
].
enterprise_fuhuas
[
0
].
startTime
)
qyjbsj
.
首次入孵时间
=
moment
(
企业孵化信息
[
0
].
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)
qyszhx
.
企业基本数据
.
dataList
=
getKeyValue
(
qyjbsj
);
if
(
企业基础信息
.
firstLoginTime
)
qyjbsj
.
迁入时间
=
moment
(
企业基础信息
.
firstLoginTime
).
format
(
"YYYY-MM-DD"
)
qyszhx
.
企业基本数据
.
dataList
=
getKeyValue
(
qyjbsj
);
//企业标签 todo
//企业标签 todo
let
qybq
=
get
企业标签
(
企业资质信息
);
let
qybq
=
get
企业标签
(
企业资质信息
);
...
@@ -901,7 +902,7 @@ function get企业动态(data) {
...
@@ -901,7 +902,7 @@ function get企业动态(data) {
honorsCount
+=
enterprise_honors
.
length
;
honorsCount
+=
enterprise_honors
.
length
;
enterprise_honors
.
forEach
(
honors
=>
{
enterprise_honors
.
forEach
(
honors
=>
{
let
awardLevel
=
changeEnumValue
(
AWARDLEVEL
,
honors
.
awardLevel
);
let
awardLevel
=
changeEnumValue
(
AWARDLEVEL
,
honors
.
awardLevel
);
let
awardTime
=
moment
(
honors
.
awardTime
).
format
(
"YYYY
-MM-DD
"
);
let
awardTime
=
moment
(
honors
.
awardTime
).
format
(
"YYYY"
);
qydt
.
push
([
honorsCount
,
honors
.
awardName
,
awardTime
,
honors
.
awardingUnit
,
awardLevel
]);
qydt
.
push
([
honorsCount
,
honors
.
awardName
,
awardTime
,
honors
.
awardingUnit
,
awardLevel
]);
})
})
})
})
...
...
src/data/db/zhyy.ts
View file @
5785408d
...
@@ -420,25 +420,26 @@ export async function getZhyy() {
...
@@ -420,25 +420,26 @@ export async function getZhyy() {
/**
/**
* 计算在孵企业面积占比:在孵企业总面积/孵化器或者园区总面积 x 100%
* 计算在孵企业面积占比:在孵企业总面积/孵化器或者园区总面积 x 100%
*/
*/
// 空数据保护
let
zaifuAreaRatio
=
0
;
if
(
!
孵化器
dbList
||
孵化器
dbList
.
length
===
0
)
{
if
(
孵化器
dbList
?.
length
>
0
)
{
孵化器
dbList
=
[{
totalArea
:
"0"
}];
// 临时兜底,根据业务调整
// 处理园区总面积
}
const
parkArea
=
孵化器
dbList
[
0
].
parkArea
;
let
园区总面积
=
isNaN
(
parkArea
)
?
0
:
parseFloat
(
parkArea
);
let
园区总面积
=
parseFloat
(
孵化器
dbList
[
0
].
totalArea
);
// 计算在孵企业的
总面积
// 计算在孵
总面积
let
在孵企业总面积
=
0
;
let
在孵企业总面积
=
0
;
fhdbList
.
forEach
(
info
=>
{
fhdbList
.
forEach
(
info
=>
{
let
{
enterprise_leases
}
=
info
;
info
.
enterprise_leases
?.
forEach
(
lease
=>
{
enterprise_leases
.
forEach
(
lease
=>
{
const
area
=
Number
(
lease
.
area
)
||
0
;
let
area
=
lease
.
area
||
0
;
在孵企业总面积
+=
isNaN
(
area
)
?
0
:
area
;
在孵企业总面积
+=
parseFloat
(
area
);
}
);
});
});
});
// 计算在孵企业面积占比
let
zaifuAreaRatio
=
(
在孵企业总面积
/
园区总面积
)
*
100
;
// 安全计算百分比
zaifuAreaRatio
=
园区总面积
>
0
?
(
在孵企业总面积
/
园区总面积
)
*
100
:
0
;
}
let
园区概况
=
[
let
园区概况
=
[
// { key: "园区面积", value: "0㎡" },
// { key: "园区面积", value: "0㎡" },
...
@@ -450,7 +451,7 @@ export async function getZhyy() {
...
@@ -450,7 +451,7 @@ export async function getZhyy() {
// { key: "员工数量", value: `0人` },
// { key: "员工数量", value: `0人` },
{
key
:
"员工数量"
,
value
:
`
${
totalEmployeeCount
}
人`
},
{
key
:
"员工数量"
,
value
:
`
${
totalEmployeeCount
}
人`
},
];
];
let
孵化器数据
=
[
let
孵化器数据
=
[
{
key
:
"孵化器面积"
,
value
:
`
${
areaCount
}
㎡`
},
{
key
:
"孵化器面积"
,
value
:
`
${
areaCount
}
㎡`
},
...
@@ -658,7 +659,7 @@ export async function getZhyy() {
...
@@ -658,7 +659,7 @@ export async function getZhyy() {
// 只有当count大于0时才添加到dataList中
// 只有当count大于0时才添加到dataList中
if
(
count
>
0
)
{
if
(
count
>
0
)
{
zhyy
.
入驻企业行业类型
.
dataList
.
push
({
key
:
keyStr
,
value
:
count
});
zhyy
.
入驻企业行业类型
.
dataList
.
push
({
key
:
keyStr
,
value
:
count
});
}
}
}
}
}
}
...
...
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