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
491f144c
Commit
491f144c
authored
Feb 21, 2025
by
zhangzhencai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
b5e2dca7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
26 deletions
+30
-26
qyfw.ts
src/data/db/qyfw.ts
+18
-2
zhyy.ts
src/data/db/zhyy.ts
+12
-24
No files found.
src/data/db/qyfw.ts
View file @
491f144c
...
@@ -171,9 +171,10 @@ export async function getEnterpriseDetails(name, type) {
...
@@ -171,9 +171,10 @@ export async function getEnterpriseDetails(name, type) {
let
selectParam
=
{};
let
selectParam
=
{};
if
(
name
)
selectParam
[
"enterpriseName"
]
=
{
"%like%"
:
name
};
if
(
name
)
selectParam
[
"enterpriseName"
]
=
{
"%like%"
:
name
};
let
dbList
=
[];
let
dbList
=
[];
if
(
type
.
length
!=
0
)
{
if
(
type
.
length
!=
0
)
{
for
(
let
i
=
0
;
i
<
type
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
type
.
length
;
i
++
)
{
let
manyTableInfo
:
any
=
{};
let
manyTableInfo
:
any
=
{};
let
info
=
type
[
i
];
let
info
=
type
[
i
];
switch
(
info
)
{
switch
(
info
)
{
...
@@ -222,7 +223,19 @@ export async function getEnterpriseDetails(name, type) {
...
@@ -222,7 +223,19 @@ export async function getEnterpriseDetails(name, type) {
})
})
//toupdate 要改掉 少用语法糖
//toupdate 要改掉 少用语法糖
let
dataList
=
[...
new
Map
(
dataChange
.
map
(
item
=>
[
item
.
eId
,
item
])).
values
()];
/**
* @author: xiaoyouyou
*/
// let dataList = [...new Map(dataChange.map(item => [item.eId, item])).values()];
let
dataList
=
[];
let
map
=
new
Map
();
for
(
let
i
=
0
;
i
<
dataChange
.
length
;
i
++
)
{
let
item
=
dataChange
[
i
];
if
(
!
map
.
has
(
item
.
eId
))
{
map
.
set
(
item
.
eId
,
true
);
dataList
.
push
(
item
);
}
}
return
dataList
;
return
dataList
;
}
}
...
@@ -306,6 +319,9 @@ async function getQyfwhzsj() {
...
@@ -306,6 +319,9 @@ async function getQyfwhzsj() {
let
企业专利
dbList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业专利表
,
{},
null
);
let
企业专利
dbList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业专利表
,
{},
null
);
企业专利
dbList
.
forEach
(
info
=>
{
企业专利
dbList
.
forEach
(
info
=>
{
/**
* @author: xiaoyouyou
*/
qyfwhzsj
.
企业专利
+=
parseInt
(
info
.
alienPatent
||
0
)
;
qyfwhzsj
.
企业专利
+=
parseInt
(
info
.
alienPatent
||
0
)
;
qyfwhzsj
.
企业专利
+=
parseInt
(
info
.
classIPatent
||
0
);
qyfwhzsj
.
企业专利
+=
parseInt
(
info
.
classIPatent
||
0
);
qyfwhzsj
.
企业专利
+=
parseInt
(
info
.
secondClassPatent
||
0
);
qyfwhzsj
.
企业专利
+=
parseInt
(
info
.
secondClassPatent
||
0
);
...
...
src/data/db/zhyy.ts
View file @
491f144c
...
@@ -87,13 +87,8 @@ export async function getZhyy() {
...
@@ -87,13 +87,8 @@ export async function getZhyy() {
let
fuWuQiYeTypeMap
=
{};
//
let
fuWuQiYeTypeMap
=
{};
//
let
fuWuList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业服务表
,
{},
null
);
let
fuWuList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业服务表
,
{},
null
);
// //添加日志输出以调试
// console.log("fuWuList:", fuWuList);
fuWuList
.
forEach
(
info
=>
{
fuWuList
.
forEach
(
info
=>
{
let
{
followUpStatus
,
eId
,
needCategory
}
=
info
;
let
{
followUpStatus
,
eId
,
needCategory
}
=
info
;
// console.log(`Processing service record:`, info); // 记录每一条服务记录
if
(
followUpStatus
==
FOLLOWUPSTATUS
.
已完成
)
{
if
(
followUpStatus
==
FOLLOWUPSTATUS
.
已完成
)
{
fuWuCount
+=
1
;
fuWuCount
+=
1
;
...
@@ -101,43 +96,36 @@ export async function getZhyy() {
...
@@ -101,43 +96,36 @@ export async function getZhyy() {
fuWuQiYeCountMap
[
eId
]
=
0
;
fuWuQiYeCountMap
[
eId
]
=
0
;
}
}
fuWuQiYeCountMap
[
eId
]
+=
1
;
fuWuQiYeCountMap
[
eId
]
+=
1
;
// console.log(`Service count for enterprise ${eId} incremented to: ${fuWuQiYeCountMap[eId]}`); // 记录企业服务数变化
let
needCategoryStr
=
changeEnumValue
(
NEEDCATEGORY
,
needCategory
)
let
needCategoryStr
=
changeEnumValue
(
NEEDCATEGORY
,
needCategory
)
// console.log(`Converted needCategory ${needCategory} to ${needCategoryStr}`); // 记录枚举值转换
if
(
!
fuWuQiYeTypeMap
[
needCategoryStr
])
fuWuQiYeTypeMap
[
needCategoryStr
]
=
0
;
if
(
!
fuWuQiYeTypeMap
[
needCategoryStr
])
fuWuQiYeTypeMap
[
needCategoryStr
]
=
0
;
fuWuQiYeTypeMap
[
needCategoryStr
]
+=
1
;
fuWuQiYeTypeMap
[
needCategoryStr
]
+=
1
;
}
}
});
});
let
fuWuQiYeCount
=
Object
.
keys
(
fuWuQiYeCountMap
).
length
;
//服务覆盖企业
let
fuWuQiYeCount
=
Object
.
keys
(
fuWuQiYeCountMap
).
length
;
//服务覆盖企业
// console.log("fuWuQiYeCountMap:", fuWuQiYeCountMap);
// console.log("fuWuQiYeTypeMap:", fuWuQiYeTypeMap);
let
fuWuQiYeTypeList
=
[];
let
fuWuQiYeTypeList
=
[];
// 遍历 NEEDCATEGORY 枚举
// 遍历 NEEDCATEGORY 枚举
const
allNeedCategories
=
Object
.
values
(
NEEDCATEGORY
);
const
allNeedCategories
=
Object
.
values
(
NEEDCATEGORY
);
/**
* @author xiaoyouyou
*/
for
(
let
key
in
NEEDCATEGORY
)
{
for
(
let
key
in
NEEDCATEGORY
)
{
let
keyAny
:
any
=
NEEDCATEGORY
[
key
];
let
keyAny
:
any
=
NEEDCATEGORY
[
key
];
if
(
isNaN
(
keyAny
))
{
if
(
isNaN
(
keyAny
))
{
//toupdate 这里继续完善 有点小bug
//toupdate 这里继续完善 有点小bug
}
let
keyStr
=
key
;
let
serviceType
=
NEEDCATEGORY
[
key
];
}
let
value
=
fuWuQiYeTypeMap
[
keyStr
]
||
0
;
allNeedCategories
.
forEach
(
category
=>
{
const
categoryStr
=
changeEnumValue
(
NEEDCATEGORY
,
category
);
if
(
fuWuQiYeTypeMap
[
categoryStr
])
{
// console.log(`Found category ${categoryStr}: ${fuWuQiYeTypeMap[categoryStr]}`);
fuWuQiYeTypeList
.
push
({
fuWuQiYeTypeList
.
push
({
key
:
categor
yStr
,
key
:
ke
yStr
,
value
:
fuWuQiYeTypeMap
[
categoryStr
]
||
0
value
:
value
});
});
}
}
});
}
// // 添加日志输出以调试
// console.log("fuWuQiYeTypeList:", fuWuQiYeTypeList);
let
在孵企业数据
=
[
let
在孵企业数据
=
[
{
key
:
"在孵企业面积占比"
,
value
:
"3%"
},
{
key
:
"在孵企业面积占比"
,
value
:
"3%"
},
...
...
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