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
cb7d96bc
Commit
cb7d96bc
authored
Feb 13, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
4f1c0b32
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
387 additions
and
18 deletions
+387
-18
enterprise.ts
src/biz/enterprise/enterprise.ts
+42
-2
financing.ts
src/biz/enterprise/financing.ts
+46
-2
base.ts
src/biz/fuHuqQi/base.ts
+43
-2
month.ts
src/biz/fuHuqQi/month.ts
+38
-1
enum.ts
src/config/enum.ts
+21
-0
enterprise.ts
src/data/enterprise/enterprise.ts
+13
-2
financing.ts
src/data/enterprise/financing.ts
+13
-2
fuhuaqi.ts
src/data/fuHuaQi/fuhuaqi.ts
+14
-3
monthTable.ts
src/data/fuHuaQi/monthTable.ts
+14
-2
admin.ts
src/routers/admin.ts
+143
-2
No files found.
src/biz/enterprise/enterprise.ts
View file @
cb7d96bc
...
...
@@ -10,7 +10,7 @@ import { EnterpriseInfoConfig } from "../../config/ojbectResultKeyConfig";
import
{
BizError
}
from
"../../util/bizError"
;
import
{
checkChange
,
checkParamater
,
extractData
,
getTaskId
}
from
"../../util/tools"
import
moment
=
require
(
"moment"
);
import
{
createEnterprise
,
deleteEnterprise
,
findEnterpriseCount
,
findEnterpriseByUscc
,
findEnterpriseList
,
findEnterpriseListByFuHuaQiUsccName
,
查询所有已绑定过的孵化器
id
}
from
"../../data/enterprise/enterprise"
;
import
{
createEnterprise
,
deleteEnterprise
,
findEnterpriseCount
,
findEnterpriseByUscc
,
findEnterpriseList
ToPage
,
findEnterpriseListByFuHuaQiUsccName
,
查询所有已绑定过的孵化器
id
,
findEnterpriseList
}
from
"../../data/enterprise/enterprise"
;
import
{
EnterpriseListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
findAllFuHuaQi
,
findFuHuaQiByUSCC
}
from
"../../data/fuHuaQi/fuhuaqi"
;
...
...
@@ -172,7 +172,7 @@ export async function enterpriseList(time:string, fuHuaQiUscc:string, industry,
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
}
let
dataBaseList
=
await
findEnterpriseList
(
selectParam
,
(
page
-
1
)
*
10
);
let
dataBaseList
=
await
findEnterpriseList
ToPage
(
selectParam
,
(
page
-
1
)
*
10
);
let
count
=
await
findEnterpriseCount
(
selectParam
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
...
...
@@ -185,6 +185,46 @@ export async function enterpriseList(time:string, fuHuaQiUscc:string, industry,
}
/**
* 导出在孵企业信息列表
* 管理后台端
* @param time 新注册时间/迁入时间
* @param fuHuaQiUscc 所属孵化器
* @param industry 行业领域
* @param isNaturalPersonHolding 自然人控股
* @returns dataList
*/
export
async
function
outPutEnterpriseData
(
time
:
string
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
)
{
let
selectParam
:
any
=
{};
if
(
time
.
length
>
0
)
{
let
startT
=
moment
(
time
).
startOf
(
'month'
).
valueOf
();
let
endT
=
moment
(
time
).
endOf
(
'month'
).
valueOf
();
selectParam
[
'$or'
]
=
[
{
"firstIncubationTime"
:{
'$gt'
:
startT
,
'$lt'
:
endT
}},
{
"timeOfImmigration"
:{
'$gt'
:
startT
,
'$lt'
:
endT
}},
];
}
if
(
time
)
selectParam
.
logonTime
=
time
;
selectParam
.
timeOfImmigration
=
time
;
if
(
fuHuaQiUscc
)
selectParam
.
fuHuaQiUscc
=
fuHuaQiUscc
;
if
(
industry
.
length
>
0
)
selectParam
.
industry
=
industry
;
if
(
isNaturalPersonHolding
==
2
||
isNaturalPersonHolding
==
3
)
{
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
}
let
dataBaseList
=
await
findEnterpriseList
(
selectParam
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
=
extractData
(
EnterpriseListConfig
,
info
);
dataList
.
push
(
changeData
);
});
return
dataList
;
}
export
async
function
getAffiliationFuHuaQi
()
{
let
dataList
=
[];
let
list
=
await
查询所有已绑定过的孵化器
id
();
...
...
src/biz/enterprise/financing.ts
View file @
cb7d96bc
...
...
@@ -7,7 +7,7 @@
import
{
FinancingParamConfig
,
FinancingParamUpdateConfig
}
from
"../../config/checkParamConfig"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
EnterpriseFinancingInfoConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
createFinancing
,
deleteEnterpriseFinancing
,
findFinancingCount
,
findFinancingInfoByTaskIdAndSucc
,
findFinancingList
}
from
"../../data/enterprise/financing"
;
import
{
createFinancing
,
deleteEnterpriseFinancing
,
findFinancingCount
,
findFinancingInfoByTaskIdAndSucc
,
findFinancingList
,
findFinancingListToPage
}
from
"../../data/enterprise/financing"
;
import
{
FinancingListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
checkChange
,
checkParamater
,
extractData
,
getTaskId
}
from
"../../util/tools"
;
...
...
@@ -164,7 +164,7 @@ export async function financingList(monthData:string, fuHuaQiName:string, indust
}
let
dataBaseList
=
await
findFinancingList
(
selectParam
,
(
page
-
1
)
*
10
);
let
dataBaseList
=
await
findFinancingList
ToPage
(
selectParam
,
(
page
-
1
)
*
10
);
let
count
=
await
findFinancingCount
(
selectParam
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
...
...
@@ -174,3 +174,46 @@ export async function financingList(monthData:string, fuHuaQiName:string, indust
return
{
count
,
dataList
};
}
/**
* 导出融资企业信息列表
* 管理后台端
* @param monthData 数据月份 目前数据库没有该字段
* @param fuHuaQiName 所属孵化器
* @param industry 行业领域
* @param fuHuaQiInvestment 孵化器是否参与投资
* @param page 页数
* @returns
*/
export
async
function
outPutFinancingList
(
monthData
:
string
,
fuHuaQiName
:
string
,
industry
,
fuHuaQiInvestment
:
number
)
{
let
fuHuaQiUscc
=
""
;
if
(
fuHuaQiName
.
length
>
0
)
{
let
fuHuaQiInfo
=
await
findFuHuaQiByName
(
fuHuaQiName
);
if
(
fuHuaQiInfo
)
fuHuaQiUscc
=
fuHuaQiInfo
.
uscc
;
}
let
selectParam
:
any
=
{};
if
(
monthData
.
length
>
0
)
{
let
startT
=
moment
(
monthData
).
startOf
(
'month'
).
valueOf
();
let
endT
=
moment
(
monthData
).
endOf
(
'month'
).
valueOf
();
selectParam
.
createTime
=
{
'$gt'
:
startT
,
'$lt'
:
endT
};
}
if
(
industry
.
length
>
0
)
selectParam
.
industry
=
industry
;
if
(
fuHuaQiUscc
.
length
>
0
)
selectParam
.
fuHuaQiUscc
=
fuHuaQiUscc
;
if
(
fuHuaQiInvestment
==
2
||
fuHuaQiInvestment
==
3
)
{
selectParam
.
fuHuaQiInvestment
=
fuHuaQiInvestment
==
2
?
true
:
false
;
}
let
dataBaseList
=
await
findFinancingList
(
selectParam
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
=
extractData
(
FinancingListConfig
,
info
);
dataList
.
push
(
changeData
);
});
return
dataList
;
}
\ No newline at end of file
src/biz/fuHuqQi/base.ts
View file @
cb7d96bc
...
...
@@ -6,7 +6,7 @@
*/
import
{
BaseParamUpdateConfig
}
from
"../../config/checkParamConfig"
;
import
{
findEnterpriseCount
,
findEnterpriseCountByFuHuaQiUscc
,
groupFindEnterprise
}
from
"../../data/enterprise/enterprise"
;
import
{
findFuHuaQiByUSCC
,
findFuHuaQiCount
,
findFuHuaQiList
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
findFuHuaQiByUSCC
,
findFuHuaQiCount
,
findFuHuaQiList
,
findFuHuaQiListByPage
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
*
as
tools
from
"../../util/tools"
;
import
{
FuHuaQiHomeDataConfig
,
FuHuaQiBaseListConfig
,
FuHuaQiBaseDataConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
FUHUAINDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
FUHUAQILV
,
INSTITUTIONALNATURE
}
from
"../../config/enum"
;
...
...
@@ -95,7 +95,7 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
let
enterpriseMap
=
await
groupFindEnterprise
();
//企业总数
let
dataBaseList
=
await
findFuHuaQiList
(
selectParam
,
(
page
-
1
)
*
10
);
let
dataBaseList
=
await
findFuHuaQiList
ByPage
(
selectParam
,
(
page
-
1
)
*
10
);
let
count
=
await
findFuHuaQiCount
(
selectParam
);
let
dataList
=
[];
...
...
@@ -118,3 +118,43 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
return
{
count
,
dataList
};
}
/**
* 导出符合条件的孵化器基本信息数据
* @param lv
* @param institutionalNature
* @param industry
* @returns
*/
export
async
function
outPutFuHuaQiBaseData
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
)
{
let
selectParam
:
any
=
{};
if
(
lv
)
selectParam
.
lv
=
lv
;
if
(
institutionalNature
)
selectParam
.
institutionalNature
=
institutionalNature
;
if
(
industry
)
selectParam
.
industry
=
industry
;
let
enterpriseMap
=
await
groupFindEnterprise
();
//企业总数
let
dataBaseList
=
await
findFuHuaQiList
(
selectParam
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
:
any
=
tools
.
extractData
(
FuHuaQiBaseListConfig
,
info
);
let
enterpriseTotal
=
enterpriseMap
[
info
.
uscc
]
||
0
;
let
numOfEntities
=
enterpriseTotal
-
(
info
.
virtualEnterpriseNum
||
0
);
numOfEntities
=
numOfEntities
<
0
?
0
:
numOfEntities
;
changeData
.
enterpriseTotal
=
enterpriseTotal
;
changeData
.
numOfEntities
=
numOfEntities
;
changeData
.
lv
=
tools
.
changeEnumValue
(
FUHUAQILV
,
changeData
.
lv
);
changeData
.
industry
=
tools
.
changeEnumValue
(
FUHUAINDUSTRY
,
changeData
.
industry
);
changeData
.
institutionalNature
=
tools
.
changeEnumValue
(
INSTITUTIONALNATURE
,
changeData
.
institutionalNature
);
dataList
.
push
(
changeData
);
});
return
dataList
;
}
\ No newline at end of file
src/biz/fuHuqQi/month.ts
View file @
cb7d96bc
...
...
@@ -108,7 +108,7 @@ export async function monthTableList(state:number, year:number, month:number, pa
if
(
year
)
selectParam
.
year
=
year
;
if
(
month
)
selectParam
.
month
=
month
;
let
dataBaseList
=
await
monthData
.
findMonthTableList
(
selectParam
,
(
page
-
1
)
*
10
);
let
dataBaseList
=
await
monthData
.
findMonthTableList
ToPage
(
selectParam
,
(
page
-
1
)
*
10
);
let
count
=
await
monthData
.
findMonthTableListCount
(
selectParam
);
let
operationNameMap
=
await
findAllFuHuaQiOperationNameMap
();
...
...
@@ -126,3 +126,39 @@ export async function monthTableList(state:number, year:number, month:number, pa
return
{
count
,
dataList
}
}
/**
* 导出月度出租率数据列表
* 管理后台端
* @param state 填报状态
* @param year 数据年份
* @param month 数据月份
* @param page 页面
*/
export
async
function
outPutMonthTableList
(
state
:
number
,
year
:
number
,
month
:
number
)
{
let
selectParam
:
any
=
{};
// if (state) selectParam.state = state;
if
(
state
==
2
||
state
==
3
)
{
selectParam
.
draftLock
=
state
==
2
?
true
:
false
;
}
if
(
year
)
selectParam
.
year
=
year
;
if
(
month
)
selectParam
.
month
=
month
;
let
dataBaseList
=
await
monthData
.
findMonthTableList
(
selectParam
);
let
operationNameMap
=
await
findAllFuHuaQiOperationNameMap
();
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
onceInfo
=
{
operationName
:
operationNameMap
[
info
.
fuHuaQiUscc
],
state
:
info
.
draftLock
==
false
?
'未填报'
:
'已填报'
,
time
:
`
${
info
.
year
}
年
${
info
.
month
}
月`
,
occupancyRate
:
info
.
occupancyRate
||
'-'
};
dataList
.
push
(
onceInfo
);
});
return
dataList
;
}
\ No newline at end of file
src/config/enum.ts
View file @
cb7d96bc
...
...
@@ -67,3 +67,23 @@ export enum UPDATESTATE {
未填报
=
1
,
已填报
=
2
}
/**
* 管理后台导出
*/
export
enum
OUTPUTTYPE
{
当前数据
=
1
,
全部数据
}
/**
* 管理后台导出数据类型
*/
export
enum
OUTPUTDATATYPE
{
基本信息
=
1
,
月度出租率
,
在孵企业
,
融资企业
}
\ No newline at end of file
src/data/enterprise/enterprise.ts
View file @
cb7d96bc
...
...
@@ -126,17 +126,28 @@ export async function deleteEnterprise(uscc:string) {
/**
* 获取所有企业
*
分页
获取所有企业
* @param selectParam 查询参数
* @param skipCount 跳过数量
* @returns [] 孵化器列表
*/
export
async
function
findEnterpriseList
(
selectParam
,
skipCount
)
{
export
async
function
findEnterpriseList
ToPage
(
selectParam
,
skipCount
)
{
return
await
enterpriseModel
.
find
(
selectParam
).
skip
(
skipCount
).
limit
(
10
);
}
/**
* 获取符合条件的所有企业
* @param selectParam 查询参数
* @param skipCount 跳过数量
* @returns [] 孵化器列表
*/
export
async
function
findEnterpriseList
(
selectParam
)
{
return
await
enterpriseModel
.
find
(
selectParam
);
}
/**
* 获取符合条件的企业数量
* @param selectParam 查询参数
* @returns number 数据数量
...
...
src/data/enterprise/financing.ts
View file @
cb7d96bc
...
...
@@ -101,12 +101,12 @@ export async function deleteEnterpriseFinancing(uscc:string, taskId:string) {
/**
* 获取所有融资企业
*
分页
获取所有融资企业
* @param selectParam 查询参数
* @param skipCount 跳过数量
* @returns [] 孵化器列表
*/
export
async
function
findFinancingList
(
selectParam
:
object
,
skipCount
:
number
)
{
export
async
function
findFinancingList
ToPage
(
selectParam
:
object
,
skipCount
:
number
)
{
return
await
financingModel
.
find
(
selectParam
).
skip
(
skipCount
).
limit
(
10
);
}
...
...
@@ -118,3 +118,13 @@ export async function deleteEnterpriseFinancing(uscc:string, taskId:string) {
export
async
function
findFinancingCount
(
selectParam
:
object
)
{
return
await
financingModel
.
find
(
selectParam
).
count
();
}
/**
* 获取所有融资企业
* @param selectParam 查询参数
* @param skipCount 跳过数量
* @returns [] 孵化器列表
*/
export
async
function
findFinancingList
(
selectParam
:
object
)
{
return
await
financingModel
.
find
(
selectParam
);
}
\ No newline at end of file
src/data/fuHuaQi/fuhuaqi.ts
View file @
cb7d96bc
...
...
@@ -105,16 +105,27 @@ export async function findFuHuaQiByToken(token:string) {
/**
*
获取所有孵化器
*
分页获取符合条件的孵化器列表
* @param selectParam 查询参数
* @param skipCount 跳过数量
* @returns [] 孵化器列表
*/
export
async
function
findFuHuaQiList
(
selectParam
,
skipCount
)
{
export
async
function
findFuHuaQiList
ByPage
(
selectParam
,
skipCount
)
{
return
await
fuHuaQiModel
.
find
(
selectParam
).
skip
(
skipCount
).
limit
(
10
);
}
/**
* 获取符合条件的所有孵化器列表
* @param selectParam 查询参数
* @param skipCount 跳过数量
* @returns [] 孵化器列表
*/
export
async
function
findFuHuaQiList
(
selectParam
)
{
return
await
fuHuaQiModel
.
find
(
selectParam
);
}
/**
* 获取所有孵化器数量
* @param selectParam 查询参数
* @returns number 数据数量
...
...
@@ -138,7 +149,7 @@ export async function findAllFuHuaQiOperationNameMap() {
}
/**
* 获取所有运营机构
名称
的map
* 获取所有运营机构的map
* @returns map key:运营机构名称 value:uscc
*/
export
async
function
findAllFuHuaQiOperationUsccMap
()
{
...
...
src/data/fuHuaQi/monthTable.ts
View file @
cb7d96bc
...
...
@@ -76,17 +76,29 @@ export async function deleteReport(uscc:string, name:string) {
/**
* 查询符合条件的月度任务列表
*
分页
查询符合条件的月度任务列表
* @param selectParam 查询参数
* @param skipNum 跳过数量
* @returns []符合条件的月度列表
*/
export
async
function
findMonthTableList
(
selectParam
:
object
,
skipNum
:
number
)
{
export
async
function
findMonthTableList
ToPage
(
selectParam
:
object
,
skipNum
:
number
)
{
return
await
monthTableModel
.
find
(
selectParam
).
skip
(
skipNum
).
limit
(
10
);
}
/**
* 查询符合条件的月度任务列表
* @param selectParam 查询参数
* @param skipNum 跳过数量
* @returns []符合条件的月度列表
*/
export
async
function
findMonthTableList
(
selectParam
:
object
)
{
return
await
monthTableModel
.
find
(
selectParam
);
}
/**
* 获取符合条件的月度任务列表数据量
* @param selectParam 查询参数
* @returns count 数据量
...
...
src/routers/admin.ts
View file @
cb7d96bc
...
...
@@ -7,7 +7,8 @@ import * as guanWeiHuiBiz from '../biz/guanWeiHui/user';
import
{
checkParamaterType
,
checkReqParam
}
from
'../util/tools'
;
import
{
BizError
}
from
'../util/bizError'
;
import
{
ERRORENUM
}
from
'../config/errorEnum'
;
import
{
monthTableList
}
from
'../biz/fuHuqQi/month'
;
import
{
monthTableList
,
outPutMonthTableList
}
from
'../biz/fuHuqQi/month'
;
import
{
OUTPUTDATATYPE
,
OUTPUTTYPE
}
from
'../config/enum'
;
export
function
setRouter
(
httpServer
)
{
...
...
@@ -23,7 +24,11 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/admin/enterprise/list'
,
asyncHandler
(
getEnterpriseList
));
httpServer
.
post
(
'/admin/enterprise/financinglist'
,
asyncHandler
(
getFinancingList
));
httpServer
.
post
(
'/admin/enterprise/affiliationfuhuaqi'
,
asyncHandler
(
affiliationFuHuaQi
));
/**导出数据 */
httpServer
.
post
(
'/admin/data/output/fuhuaqi'
,
asyncHandler
(
outPutFuHuaQiData
));
httpServer
.
post
(
'/admin/data/output/enterprise'
,
asyncHandler
(
outPutEnterpriseData
));
httpServer
.
post
(
'/admin/data/output/financing'
,
asyncHandler
(
outPutFinancingData
));
httpServer
.
post
(
'/admin/data/output/month'
,
asyncHandler
(
outPutMonthData
));
}
...
...
@@ -139,3 +144,138 @@ async function affiliationFuHuaQi(req, res) {
let
result
=
await
enterpriseBiz
.
getAffiliationFuHuaQi
();
res
.
success
(
result
);
}
async
function
outPutFuHuaQiData
(
req
,
res
)
{
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
industry
:
'Number'
,
dataType
:
'Number'
,
type
:
'Number'
,
page
:
'Number'
};
let
{
lv
,
institutionalNature
,
industry
,
type
,
page
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
dataList
=
[];
if
(
type
==
OUTPUTTYPE
.
全部数据
)
dataList
=
await
baseBiz
.
outPutFuHuaQiBaseData
(
lv
,
institutionalNature
,
industry
);
else
{
let
baseData
=
await
baseBiz
.
fuHuaQiBaseList
(
lv
,
institutionalNature
,
industry
,
page
);
dataList
=
baseData
.
dataList
;
}
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
]
||
''
);
});
result
.
push
(
subList
);
});
res
.
success
({
data
:
result
});
}
async
function
outPutEnterpriseData
(
req
,
res
)
{
let
reqConf
=
{
time
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
page
:
'Number'
,
type
:
'Number'
};
let
{
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
dataList
=
[];
if
(
type
==
OUTPUTTYPE
.
全部数据
)
dataList
=
await
enterpriseBiz
.
outPutEnterpriseData
(
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
);
else
{
let
baseData
=
await
enterpriseBiz
.
enterpriseList
(
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
);
dataList
=
baseData
.
dataList
;
}
let
keyList
=
[
"name"
,
"createTime"
,
"fuhuaqiUscc"
,
"uscc"
,
"industry"
,
"logonTime"
,
"firstIncubationTime"
,
"timeOfImmigration"
,
"isNaturalPersonHolding"
,
"oldLogonAdd"
,
"logonAdd"
,
"operatingAdd"
,
"leasedArea"
];
let
titleList
=
[
"企业名称"
,
"入库时间"
,
"所属孵化器"
,
"统一信用代码"
,
"行业领域"
,
"注册时间"
,
"首次入孵时间"
,
"迁入时间"
,
"是否自然人控股"
,
"迁入前注册地址"
,
"注册地址"
,
"经营地址"
,
"租赁面积(平方米)"
];
let
result
=
[
titleList
];
dataList
.
forEach
(
info
=>
{
let
subList
=
[];
keyList
.
forEach
(
subInfo
=>
{
subList
.
push
(
info
[
subInfo
]
||
''
);
});
result
.
push
(
subList
);
});
res
.
success
({
data
:
result
});
}
async
function
outPutFinancingData
(
req
,
res
)
{
let
reqConf
=
{
monthData
:
'String'
,
fuHuaQiName
:
'String'
,
fuHuaQiInvestment
:
'Number'
,
industry
:
'[Number]'
,
page
:
'Number'
,
type
:
'Number'
};
let
{
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
page
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
dataList
=
[];
if
(
type
==
OUTPUTTYPE
.
全部数据
)
dataList
=
await
financingBiz
.
outPutFinancingList
(
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
);
else
{
let
baseData
=
await
financingBiz
.
financingList
(
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
page
);
dataList
=
baseData
.
dataList
;
}
let
keyList
=
[
"name"
,
"logonAdd"
,
"operatingAdd"
,
"financingAmount"
,
"investmentInstitutionsName"
,
"timeToObtainInvestment"
,
"fuHuaQiInvestment"
,
"fuHuaQiInvestmentAmount"
,
"fuHuaQiInvestmentStyle"
,
"createTime"
];
let
titleList
=
[
"企业名称"
,
"注册地址"
,
"经营地址"
,
"融资金额(万元)"
,
"投资机构名称"
,
"获得投资时间"
,
"孵化器是否投资"
,
"孵化器投资金额(万元)"
,
"孵化器投资方式"
,
"录入时间"
,
];
let
result
=
[
titleList
];
dataList
.
forEach
(
info
=>
{
let
subList
=
[];
keyList
.
forEach
(
subInfo
=>
{
subList
.
push
(
info
[
subInfo
]
||
''
);
});
result
.
push
(
subList
);
});
res
.
success
({
data
:
result
});
}
async
function
outPutMonthData
(
req
,
res
)
{
let
reqConf
=
{
state
:
'Number'
,
year
:
'Number'
,
month
:
'Number'
,
page
:
'Number'
,
type
:
'Number'
};
let
{
state
,
year
,
month
,
page
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
dataList
=
[];
if
(
type
==
OUTPUTTYPE
.
全部数据
)
dataList
=
await
outPutMonthTableList
(
state
,
year
,
month
);
else
{
let
baseData
=
await
await
monthTableList
(
state
,
year
,
month
,
page
);
dataList
=
baseData
.
dataList
;
}
let
keyList
=
[
"operationName"
,
"state"
,
"time"
,
"occupancyRate"
,
];
let
titleList
=
[
"运营机构名称"
,
"填报状态"
,
"数据月份"
,
"出租率(%)"
];
let
result
=
[
titleList
];
dataList
.
forEach
(
info
=>
{
let
subList
=
[];
keyList
.
forEach
(
subInfo
=>
{
subList
.
push
(
info
[
subInfo
]
||
''
);
});
result
.
push
(
subList
);
});
res
.
success
({
data
:
result
});
}
\ 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