Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
66f99b85
Commit
66f99b85
authored
Feb 21, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
4e86b316
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
139 additions
and
72 deletions
+139
-72
out0213_3.zip
out0213_3.zip
+0
-0
enterprise.ts
src/biz/enterprise/enterprise.ts
+5
-4
base.ts
src/biz/fuHuqQi/base.ts
+104
-60
ojbectResultKeyConfig.ts
src/config/ojbectResultKeyConfig.ts
+2
-0
enterprise.ts
src/data/enterprise/enterprise.ts
+1
-1
fuhuaqi.ts
src/data/fuHuaQi/fuhuaqi.ts
+1
-1
fuHuaQi.ts
src/routers/admin/fuHuaQi.ts
+3
-3
dataInit.ts
src/tools/dataInit.ts
+7
-1
verificationEnum.ts
src/util/verificationEnum.ts
+16
-2
No files found.
out0213_3.zip
deleted
100644 → 0
View file @
4e86b316
File deleted
src/biz/enterprise/enterprise.ts
View file @
66f99b85
...
...
@@ -209,12 +209,13 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
* 管理后台端
* @param createType 新注册时间/迁入时间
* @param fuHuaQiUscc 所属孵化器
* @param industry 行业领域
* @param industry 行业领域
数组
* @param isNaturalPersonHolding 自然人控股
* @returns
dataList
* @returns
二维数组
*/
export
async
function
outPutEnterpriseData
(
createType
:
number
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
,
type
:
Number
)
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
//查询参数
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
if
(
createType
==
2
||
createType
==
3
)
{
selectParam
.
isCreate
=
createType
==
2
?
true
:
false
;
...
...
@@ -225,9 +226,9 @@ export async function outPutEnterpriseData(createType:number, fuHuaQiUscc:string
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
}
}
selectParam
.
draftLock
=
true
;
//匹配已经提交入库的企业
let
usccMap
=
await
fuHuaQiData
.
findAllFuHuaQiOperationNameMap
();
selectParam
.
draftLock
=
true
;
let
dataBaseList
=
await
enterpriseData
.
findEnterpriseList
(
selectParam
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
...
...
src/biz/fuHuqQi/base.ts
View file @
66f99b85
...
...
@@ -5,7 +5,7 @@
*
*/
import
{
BaseParamUpdateConfig
,
OrganizationParamUpdateConfig
}
from
"../../config/checkParamConfig"
;
import
{
findEnterpriseCountByFuHuaQiUscc
,
groupFindEnterprise
}
from
"../../data/enterprise/enterprise"
;
import
{
findEnterpriseCountByFuHuaQiUscc
,
groupFindEnterprise
Count
}
from
"../../data/enterprise/enterprise"
;
import
*
as
fuhuaqiData
from
"../../data/fuHuaQi/fuhuaqi"
;
import
*
as
resultConfig
from
"../../config/ojbectResultKeyConfig"
;
import
*
as
configEnum
from
"../../config/enum"
;
...
...
@@ -151,6 +151,8 @@ export async function updateOrganizationData(uscc:string, param) {
* @param lv 孵化器等级
* @param institutionalNature 机构性质
* @param industry 领域
* @param operationModel 运营模式
* @param foundingTeam 创业团队
* @param page 页数
* @returns
*/
...
...
@@ -162,7 +164,7 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
if
(
operationModel
)
selectParam
.
operationModel
=
operationModel
;
if
(
foundingTeam
)
selectParam
.
foundingTeamType
=
foundingTeam
;
let
enterpriseMap
=
await
groupFindEnterprise
();
//企业总数
let
enterpriseMap
=
await
groupFindEnterprise
Count
();
//企业总数
let
dataBaseList
=
await
fuhuaqiData
.
findFuHuaQiListByPage
(
selectParam
,
(
page
-
1
)
*
10
);
...
...
@@ -189,11 +191,6 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
changeData
.
industry
=
changeEnumValue
(
configEnum
.
FUHUAINDUSTRY
,
changeData
.
industry
);
changeData
.
institutionalNature
=
changeEnumValue
(
configEnum
.
INSTITUTIONALNATURE
,
changeData
.
institutionalNature
);
changeData
.
operationModel
=
changeEnumValue
(
configEnum
.
OPERATIONMODEL
,
changeData
.
operationModel
);
if
(
changeData
.
operationModel
==
"_投资__孵化_类型"
){
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"__"
,
"+"
);
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"_"
,
"“"
);
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"_"
,
"”"
);
}
changeData
.
foundingTeamStr
=
"无"
;
let
foundingTeam
=
[];
...
...
@@ -223,87 +220,133 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
/**
* 导出符合条件的孵化器基本信息数据
* @param lv
* @param institutionalNature
* @param industry
* @param lv 孵化器等级
* @param institutionalNature 机构性质
* @param industry 领域
* @param operationModel 运营模式
* @param foundingTeam 创业团队
* @param type 导出类型 OUTPUTTYPE 枚举
* @returns
*/
export
async
function
outPutFuHuaQiBaseData
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
,
type
:
Number
)
{
export
async
function
outPutFuHuaQiBaseData
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
,
operationModel
:
number
,
foundingTeam
:
number
,
type
:
Number
)
{
let
selectParam
:
any
=
{};
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
if
(
lv
)
selectParam
.
lv
=
lv
;
if
(
operationModel
)
selectParam
.
operationModel
=
operationModel
;
if
(
institutionalNature
)
selectParam
.
institutionalNature
=
institutionalNature
;
if
(
industry
)
selectParam
.
industry
=
industry
;
if
(
foundingTeam
)
selectParam
.
foundingTeamType
=
foundingTeam
;
}
let
enterpriseMap
=
await
groupFindEnterprise
();
//企业总数
let
enterpriseMap
=
await
groupFindEnterpriseCount
();
//拥有的企业
let
dataBaseList
=
await
fuhuaqiData
.
findFuHuaQiList
(
selectParam
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
:
any
=
extractData
(
resultConfig
.
FuHuaQiBaseListConfig
,
info
,
true
);
let
keyList
=
[
"name"
,
//名称
"operationName"
,
//运营机构名称
"uscc"
,
//统一信用代码
"enterpriseTotal"
,
//企业总数
"virtualEnterpriseNum"
,
//虚拟孵化
"numOfEntities"
,
//实体孵化
"logonTime"
,
//注册时间
"incubatedAcreage"
,
//在孵面积
"acreageTotal"
,
//孵化器总面积
"acreagePersonalUse"
,
//孵化器自用面积
"lv"
,
//孵化器级别
"identificationTime"
,
//认定时间
"industry"
,
//领域
"institutionalNature"
,
//机构性质
"liaison"
,
//联系人
"liaisonPhone"
,
//联系电话
"personInCharge"
,
//负责人
"personInChargePhone"
,
//负责人联系电话
"operationModel"
,
//运营模式
"foundingTeamType"
,
//创业团队类型
// "hatchingGround",//经备案孵化场地
// "foundingTeam",//创业团队
];
let
titleList
=
[
"名称"
,
"运营机构名称"
,
"统一信用代码"
,
"企业总数"
,
"虚拟孵化"
,
"实体孵化"
,
"注册时间"
,
"在孵面积"
,
"孵化器总面积"
,
"孵化器自用面积"
,
"孵化器级别"
,
"认定时间"
,
"领域"
,
"机构性质"
,
"联系人"
,
"联系电话"
,
"负责人"
,
"负责人联系电话"
];
let
enterpriseTotal
=
enterpriseMap
[
info
.
uscc
]
||
0
;
let
numOfEntities
=
enterpriseTotal
-
(
info
.
virtualEnterpriseNum
||
0
);
numOfEntities
=
numOfEntities
<
0
?
0
:
numOfEntities
;
let
dataList
=
[];
let
maxTeamNumber
=
0
;
//最大团队数
let
maxHatching
=
0
;
//最大场地数
dataBaseList
.
forEach
(
info
=>
{
let
changeData
:
any
=
extractData
(
resultConfig
.
FuHuaQiBaseListConfig
,
info
,
true
);
//截取特定的字段
changeData
.
enterpriseTotal
=
enterpriseTotal
;
changeData
.
numOfEntities
=
numOfEntities
;
const
EnterpriseTotal
=
enterpriseMap
[
info
.
uscc
]
||
0
;
//企业总数
let
numOfEntities
=
EnterpriseTotal
-
(
info
.
virtualEnterpriseNum
||
0
);
//实体企业
changeData
.
enterpriseTotal
=
EnterpriseTotal
;
changeData
.
numOfEntities
=
numOfEntities
<
0
?
0
:
numOfEntities
;
changeData
.
lv
=
changeEnumValue
(
configEnum
.
FUHUAQILV
,
changeData
.
lv
);
changeData
.
industry
=
changeEnumValue
(
configEnum
.
FUHUAINDUSTRY
,
changeData
.
industry
);
changeData
.
institutionalNature
=
changeEnumValue
(
configEnum
.
INSTITUTIONALNATURE
,
changeData
.
institutionalNature
);
changeData
.
operationModel
=
changeEnumValue
(
configEnum
.
OPERATIONMODEL
,
changeData
.
operationModel
);
if
(
changeData
.
operationModel
==
"_投资__孵化_类型"
){
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"__"
,
"+"
);
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"_"
,
"“"
);
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"_"
,
"”"
);
changeData
.
foundingTeamType
=
changeEnumValue
(
configEnum
.
TEAM
,
changeData
.
foundingTeamType
)
||
"无"
;
if
(
changeData
.
foundingTeam
&&
changeData
.
foundingTeam
.
length
)
{
maxTeamNumber
=
Math
.
max
(
changeData
.
foundingTeam
.
length
,
maxTeamNumber
);
}
if
(
changeData
.
hatchingGround
&&
changeData
.
hatchingGround
.
length
)
{
maxHatching
=
Math
.
max
(
changeData
.
hatchingGround
.
length
,
maxHatching
);
}
changeData
.
foundingTeamStr
=
"无"
;
let
foundingTeam
=
[];
if
(
changeData
.
foundingTeam
&&
changeData
.
foundingTeam
.
length
)
{
changeData
.
foundingTeam
.
forEach
(
item
=>
{
let
{
memberName
,
memberAge
,
memberSchool
,
des
}
=
item
;
let
type
=
changeEnumValue
(
configEnum
.
TEAM
,
item
.
type
);
//人才类型
foundingTeam
.
push
({
memberName
,
memberAge
,
memberSchool
,
des
,
type
,
memberSex
:
changeEnumValue
(
configEnum
.
SEX
,
item
.
memberSex
),
//成员性别
memberDEGREE
:
changeEnumValue
(
configEnum
.
DEGREE
,
item
.
memberDEGREE
),
//成员最高学历
let
subList
=
[];
keyList
.
forEach
(
subInfo
=>
{
subList
.
push
(
info
[
subInfo
]
||
''
);
});
// item.memberDEGREE = changeEnumValue(configEnum.DEGREE, item.foundingTeamStr);//成员最高学历
/* 这里兼容了一下,团队类型数据库里存到了每一个人的信息里 以防后续要修改 */
changeData
.
foundingTeamStr
=
type
;
dataList
.
push
(
subList
);
});
changeData
.
foundingTeam
=
foundingTeam
;
}
dataList
.
push
(
changeData
);
let
teamKeyList
=
[
"type"
,
"memberName"
,
"memberSex"
,
"memberAge"
,
"memberDEGREE"
,
"memberSchool"
,
"des"
];
let
teamTitleList
=
[
"人才类型"
,
"成员姓名"
,
"成员性别"
,
"成员年龄"
,
"成员最高学历"
,
"毕业学校"
,
"履历描述"
];
/**得到最大值之后生成下标 */
for
(
let
i
=
0
;
i
<
maxTeamNumber
;
i
++
)
{
let
teamNum
=
i
+
1
;
teamTitleList
.
forEach
(
title
=>
{
titleList
.
push
(
`成员
${
teamNum
}
-
${
title
}
`
);
});
}
let
hatchingStartIndex
=
teamKeyList
.
length
;
/**得到最大值之后生成下标 */
let
hatchingKeyList
=
[
"personInChargeAdd"
,
"siteAcreage"
,
"leasePrice"
];
let
hatchingTitleList
=
[
"孵化场地地址"
,
"孵化场地面积"
,
"孵化场地出租单价"
];
for
(
let
i
=
0
;
i
<
maxTeamNumber
;
i
++
)
{
let
teamNum
=
i
+
1
;
hatchingTitleList
.
forEach
(
title
=>
{
titleList
.
push
(
`场地
${
teamNum
}
-
${
title
}
`
);
});
}
dataBaseList
.
forEach
((
info
,
index
)
=>
{
if
(
info
.
foundingTeam
&&
info
.
foundingTeam
.
length
)
{
info
.
foundingTeam
.
forEach
(
teamInfo
=>
{
teamKeyList
.
forEach
(
teamKey
=>
{
let
addValue
=
teamInfo
[
teamKey
];
if
(
teamKey
==
"type"
)
addValue
=
changeEnumValue
(
configEnum
.
TEAM
,
addValue
);
if
(
teamKey
==
"memberSex"
)
addValue
=
changeEnumValue
(
configEnum
.
SEX
,
addValue
);
if
(
teamKey
==
"memberDEGREE"
)
addValue
=
changeEnumValue
(
configEnum
.
DEGREE
,
addValue
);
dataList
[
index
].
push
(
addValue
);
});
});
}
if
(
info
.
hatchingGround
&&
info
.
hatchingGround
.
length
)
{
let
keyList
=
[
"name"
,
"operationName"
,
"uscc"
,
"virtualEnterpriseNum"
,
"logonTime"
,
"incubatedAcreage"
,
"acreageTotal"
,
"acreagePersonalUse"
,
"lv"
,
"identificationTime"
,
"industry"
,
"institutionalNature"
,
"liaison"
,
"liaisonPhone"
,
"personInCharge"
,
"personInChargePhone"
,
"personInChargeAdd"
,
"siteAcreage"
,
"leasePrice"
];
let
titleList
=
[
"名称"
,
"运营机构名称"
,
"统一信用代码"
,
"虚拟企业数量"
,
"注册时间"
,
"在孵面积"
,
"孵化器总面积"
,
"孵化器自用面积"
,
"孵化器级别"
,
"认定时间"
,
"领域"
,
"机构性质"
,
"联系人"
,
"联系电话"
,
"负责人"
,
"负责人联系电话"
,
"孵化场地地址"
,
"孵化场地面积"
,
"孵化场地出租单价"
];
let
result
=
[
titleList
];
dataList
.
forEach
(
info
=>
{
let
subList
=
[];
keyList
.
forEach
(
subInfo
=>
{
subList
.
push
(
info
[
subInfo
]
||
''
);
info
.
hatchingGround
.
forEach
((
hatchingInfo
,
hatchingIndex
)
=>
{
1
hatchingKeyList
.
forEach
(
(
hatchingKey
,
hatchingKeyIndex
)
=>
{
let
addIndex
=
hatchingStartIndex
+
(
(
hatchingIndex
*
3
)
+
(
hatchingKeyIndex
)
)
dataList
[
index
][
addIndex
]
=
hatchingInfo
[
hatchingKey
];
});
});
result
.
push
(
subList
);
}
});
return
result
;
dataList
.
unshift
(
titleList
)
return
dataList
;
}
\ No newline at end of file
src/config/ojbectResultKeyConfig.ts
View file @
66f99b85
...
...
@@ -26,6 +26,7 @@ export const FuHuaQiBaseListConfig = {
hatchingGround
:{
key
:
"经备案孵化场地"
},
foundingTeam
:{
key
:
"创业团队"
},
operationModel
:{
key
:
"运营模式"
},
foundingTeamType
:{
key
:
"创业团队类型"
}
};
/**
...
...
@@ -61,6 +62,7 @@ export const EnterpriseFinancingInfoConfig = {
fuHuaQiInvestment
:{
key
:
"孵化器是否投资"
},
fuHuaQiInvestmentAmount
:{
key
:
"孵化器投资金额(万元)"
},
//
fuHuaQiInvestmentStyle
:{
key
:
"孵化器投资方式"
},
//
financingRounds
:{
key
:
"融资轮次"
}
};
/**
...
...
src/data/enterprise/enterprise.ts
View file @
66f99b85
...
...
@@ -117,7 +117,7 @@ export async function findEnterpriseCountByFuHuaQiUscc(fuHuaQiUscc:string) {
* 聚合查询 孵化器所拥有的企业数量
* @returns {} key=孵化器统一信用 value=企业数量
*/
export
async
function
groupFindEnterprise
()
{
export
async
function
groupFindEnterprise
Count
()
{
let
match
=
{
draftLock
:
true
};
//前置条件
let
dataList
=
await
enterpriseModel
.
aggregate
([{
$match
:
match
},{
$group
:{
_id
:
"$fuHuaQiUscc"
,
count
:{
$sum
:
1
}}}]).
exec
();
let
result
=
{};
...
...
src/data/fuHuaQi/fuhuaqi.ts
View file @
66f99b85
...
...
@@ -46,7 +46,7 @@ const fuHuaQiSchema = new Schema({
personInChargePhone
:
String
,
//负责人联系电话
hatchingGround
:{
type
:[
hatchingGroundSchema
],
default
:[]
},
//经备案孵化场地
foundingTeam
:{
type
:[
foundingTeamSchema
],
default
:[]},
//创业团队
foundingTeamType
:{
type
:
Number
,
default
:
0
},
//创业团队类型
foundingTeamType
:{
type
:
Number
,
default
:
1
},
//创业团队类型
operationModel
:{
type
:[
Number
],
default
:[]},
//运营模式
operationModelDes
:
String
,
//运营模式描述
/**登录相关 */
...
...
src/routers/admin/fuHuaQi.ts
View file @
66f99b85
...
...
@@ -103,10 +103,10 @@ async function addUser(req, res) {
async
function
outPutFuHuaQiData
(
req
,
res
)
{
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
industry
:
'Number'
,
dataType
:
'Number'
,
type
:
'Number'
};
let
{
lv
,
institutionalNature
,
industry
,
type
}
=
eccReqNotMustHaveParam
(
reqConf
,
req
.
body
);
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
industry
:
'Number'
,
type
:
'Number'
,
operationModel
:
"Number"
,
foundingTeam
:
"Number"
};
let
{
lv
,
institutionalNature
,
industry
,
type
,
operationModel
,
foundingTeam
}
=
eccReqNotMustHaveParam
(
reqConf
,
req
.
body
);
let
dataList
=
await
baseBiz
.
outPutFuHuaQiBaseData
(
lv
,
institutionalNature
,
industry
,
type
);
let
dataList
=
await
baseBiz
.
outPutFuHuaQiBaseData
(
lv
,
institutionalNature
,
industry
,
operationModel
,
foundingTeam
,
type
);
let
name
=
`孵化器列表
${
getTimeKey
()}
.xlsx`
;
...
...
src/tools/dataInit.ts
View file @
66f99b85
...
...
@@ -218,7 +218,13 @@ async function initEnterprise() {
if
(
i
==
8
&&
item
)
{
value
=
new
Date
((
item
-
25569
)
*
86400
*
1000
+
utc
.
getTimezoneOffset
()
*
1000
*
60
);
}
if
([
8
,
9
,
15
,
18
].
indexOf
(
i
)
>
-
1
)
{
if
(
i
==
9
&&
item
)
{
value
=
new
Date
((
item
-
25569
)
*
86400
*
1000
+
utc
.
getTimezoneOffset
()
*
1000
*
60
);
}
if
(
i
==
15
&&
item
)
{
value
=
new
Date
((
item
-
25569
)
*
86400
*
1000
+
utc
.
getTimezoneOffset
()
*
1000
*
60
);
}
if
([
18
].
indexOf
(
i
)
>
-
1
)
{
if
(
!
item
)
value
=
0
;
else
value
=
new
Date
(
value
).
valueOf
()
}
...
...
src/util/verificationEnum.ts
View file @
66f99b85
...
...
@@ -32,11 +32,25 @@ export function checkEnumValue(enumConf, value:any) {
export
function
changeEnumValue
(
enumConf
,
value
:
any
)
{
if
(
!
value
)
return
''
;
if
(
typeof
value
==
'number'
)
{
return
enumConf
[
value
];
let
str
=
enumConf
[
value
];
/** 特化处理 中文引号在枚举中不适用*/
if
(
str
==
"_投资__孵化_类型"
)
{
str
=
str
.
replace
(
"__"
,
"+"
);
str
=
str
.
replace
(
"_"
,
"“"
);
str
=
str
.
replace
(
"_"
,
"”"
);
}
return
str
}
let
str
=
""
;
value
.
forEach
((
item
,
index
)
=>
{
str
+=
enumConf
[
item
];
let
subStr
=
enumConf
[
item
];
/** 特化处理 中文引号在枚举中不适用*/
if
(
subStr
==
"_投资__孵化_类型"
)
{
subStr
=
subStr
.
replace
(
"__"
,
"+"
);
subStr
=
subStr
.
replace
(
"_"
,
"“"
);
subStr
=
subStr
.
replace
(
"_"
,
"”"
);
}
str
+=
subStr
;
if
(
index
==
value
.
length
-
1
)
str
+=
""
;
else
str
+=
","
});
...
...
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