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
381f01fe
Commit
381f01fe
authored
Mar 27, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0封版 修bug
parent
fa991a1c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
120 additions
and
34 deletions
+120
-34
enterprise.ts
src/biz/admin/enterprise/enterprise.ts
+33
-3
fuHuaQi.ts
src/biz/admin/fuHuaQi/fuHuaQi.ts
+35
-6
month.ts
src/biz/admin/fuHuaQi/month.ts
+1
-1
splitResultConfig.ts
src/config/splitResultConfig.ts
+2
-0
enterprise.ts
src/routers/admin/enterprise.ts
+24
-13
fuHuaQi.ts
src/routers/admin/fuHuaQi.ts
+25
-11
No files found.
src/biz/admin/enterprise/enterprise.ts
View file @
381f01fe
...
@@ -4,6 +4,7 @@ import * as splitResultConfig from "../../../config/splitResultConfig";
...
@@ -4,6 +4,7 @@ import * as splitResultConfig from "../../../config/splitResultConfig";
import
*
as
fuHuaQiData
from
"../../../data/fuHuaQi/fuhuaqi"
;
import
*
as
fuHuaQiData
from
"../../../data/fuHuaQi/fuhuaqi"
;
import
*
as
configEnum
from
"../../../config/enum"
;
import
*
as
configEnum
from
"../../../config/enum"
;
import
*
as
verificationEnumTools
from
"../../../util/verificationEnum"
;
import
*
as
verificationEnumTools
from
"../../../util/verificationEnum"
;
import
moment
=
require
(
"moment"
);
/**
/**
...
@@ -13,10 +14,12 @@ import * as verificationEnumTools from "../../../util/verificationEnum";
...
@@ -13,10 +14,12 @@ import * as verificationEnumTools from "../../../util/verificationEnum";
* @param fuHuaQiUscc 所属孵化器
* @param fuHuaQiUscc 所属孵化器
* @param industry 行业领域
* @param industry 行业领域
* @param isNaturalPersonHolding 自然人控股
* @param isNaturalPersonHolding 自然人控股
* @param state 孵化状态2.0
* @param createTime 入库时间
* @param page 页数
* @param page 页数
* @returns
{dataList:[], count:0}
dataList=数据列表 count:条件筛选下的数据总数
* @returns
dataList:[], count:0
dataList=数据列表 count:条件筛选下的数据总数
*/
*/
export
async
function
enterpriseList
(
createType
:
number
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
,
page
:
number
)
{
export
async
function
enterpriseList
(
createType
:
number
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
,
state
:
number
,
createTime
:
number
,
name
:
string
,
page
:
number
)
{
/**拼接查询条件 */
/**拼接查询条件 */
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
createType
==
2
||
createType
==
3
)
{
if
(
createType
==
2
||
createType
==
3
)
{
...
@@ -30,6 +33,18 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
...
@@ -30,6 +33,18 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
if
(
isNaturalPersonHolding
==
2
||
isNaturalPersonHolding
==
3
)
{
if
(
isNaturalPersonHolding
==
2
||
isNaturalPersonHolding
==
3
)
{
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
}
}
if
(
state
!=
configEnum
.
INSIDESTATE
.
全部
)
{
if
(
state
==
configEnum
.
INSIDESTATE
.
实体孵化
)
selectParam
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
if
(
state
==
configEnum
.
INSIDESTATE
.
虚拟孵化
)
selectParam
.
state
=
configEnum
.
FUHUASTATE
.
虚拟孵化
;
}
if
(
createTime
)
{
let
startT
=
createTime
;
let
endT
=
moment
(
createTime
).
endOf
(
'month'
).
valueOf
();
selectParam
.
createTime
=
{
"$gt"
:
startT
,
"$lt"
:
endT
};
}
if
(
name
)
{
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
}
selectParam
.
draftLock
=
true
;
//未提交的企业不能查看
selectParam
.
draftLock
=
true
;
//未提交的企业不能查看
/**需要用到的查询数据 */
/**需要用到的查询数据 */
...
@@ -50,6 +65,9 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
...
@@ -50,6 +65,9 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
if
(
info
.
enterpriseIsInPut
)
changeData
.
isCreate
=
""
;
if
(
info
.
enterpriseIsInPut
)
changeData
.
isCreate
=
""
;
else
changeData
.
isCreate
=
(
changeData
.
isCreate
)
?
"新注册"
:
"新迁入"
;
else
changeData
.
isCreate
=
(
changeData
.
isCreate
)
?
"新注册"
:
"新迁入"
;
changeData
.
state
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
FUHUASTATE
,
changeData
.
state
);
changeData
.
virtualCause
=
!
changeData
.
virtualCause
?
'-'
:
verificationEnumTools
.
changeEnumValue
(
configEnum
.
VIRTUALCAUSE
,
changeData
.
virtualCause
);
/**将枚举值转为字符 */
/**将枚举值转为字符 */
changeData
.
industry
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
INDUSTRY
,
changeData
.
industry
);
changeData
.
industry
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
INDUSTRY
,
changeData
.
industry
);
...
@@ -69,7 +87,7 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
...
@@ -69,7 +87,7 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
* @param isNaturalPersonHolding 自然人控股
* @param isNaturalPersonHolding 自然人控股
* @returns 二维数组
* @returns 二维数组
*/
*/
export
async
function
outPutEnterpriseData
(
createType
:
number
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
,
type
:
N
umber
)
{
export
async
function
outPutEnterpriseData
(
createType
:
number
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
,
state
:
number
,
createTime
:
number
,
name
:
string
,
type
:
n
umber
)
{
/**拼接查询条件 */
/**拼接查询条件 */
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
...
@@ -81,6 +99,18 @@ export async function outPutEnterpriseData(createType:number, fuHuaQiUscc:string
...
@@ -81,6 +99,18 @@ export async function outPutEnterpriseData(createType:number, fuHuaQiUscc:string
if
(
isNaturalPersonHolding
==
2
||
isNaturalPersonHolding
==
3
)
{
if
(
isNaturalPersonHolding
==
2
||
isNaturalPersonHolding
==
3
)
{
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
}
}
if
(
state
!=
configEnum
.
INSIDESTATE
.
全部
)
{
if
(
state
==
configEnum
.
INSIDESTATE
.
实体孵化
)
selectParam
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
if
(
state
==
configEnum
.
INSIDESTATE
.
虚拟孵化
)
selectParam
.
state
=
configEnum
.
FUHUASTATE
.
虚拟孵化
;
}
if
(
createTime
)
{
let
startT
=
createTime
;
let
endT
=
moment
(
createTime
).
endOf
(
'month'
).
valueOf
();
selectParam
.
createTime
=
{
"$gt"
:
startT
,
"$lt"
:
endT
};
}
if
(
name
)
{
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
}
}
}
selectParam
.
draftLock
=
true
;
//匹配已经提交入库的企业
selectParam
.
draftLock
=
true
;
//匹配已经提交入库的企业
...
...
src/biz/admin/fuHuaQi/fuHuaQi.ts
View file @
381f01fe
...
@@ -26,10 +26,11 @@ import { sendInitPointOut } from "../../sms";
...
@@ -26,10 +26,11 @@ import { sendInitPointOut } from "../../sms";
* @param industry 领域
* @param industry 领域
* @param operationModel 运营模式
* @param operationModel 运营模式
* @param foundingTeam 创业团队
* @param foundingTeam 创业团队
* @param name 运营机构名称
* @param page 页数
* @param page 页数
* @returns
* @returns
*/
*/
export
async
function
fuHuaQiBaseList
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
,
operationModel
:
number
,
foundingTeam
:
number
,
page
:
number
)
{
export
async
function
fuHuaQiBaseList
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
,
operationModel
:
number
,
foundingTeam
:
number
,
name
:
string
,
page
:
number
)
{
/**拼接查询条件 并且校验是否符合枚举范围 可优化 抽出一个方法统一校验 */
/**拼接查询条件 并且校验是否符合枚举范围 可优化 抽出一个方法统一校验 */
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
lv
)
{
if
(
lv
)
{
...
@@ -52,6 +53,9 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
...
@@ -52,6 +53,9 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
eccEnumValue
(
"管理后台查询孵化器列表"
,
" 创业团队 "
,
configEnum
.
TEAM
,
foundingTeam
);
eccEnumValue
(
"管理后台查询孵化器列表"
,
" 创业团队 "
,
configEnum
.
TEAM
,
foundingTeam
);
selectParam
.
foundingTeamType
=
foundingTeam
;
selectParam
.
foundingTeamType
=
foundingTeam
;
}
}
if
(
name
)
{
selectParam
.
operationName
=
{
"$regex"
:
`
${
name
}
`
};
}
let
enterpriseMap
=
await
groupFindEnterpriseCount
();
//计算孵化器拥有的企业总数
let
enterpriseMap
=
await
groupFindEnterpriseCount
();
//计算孵化器拥有的企业总数
...
@@ -110,11 +114,10 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
...
@@ -110,11 +114,10 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
* @param type 导出类型 OUTPUTTYPE 枚举
* @param type 导出类型 OUTPUTTYPE 枚举
* @returns
* @returns
*/
*/
export
async
function
outPutFuHuaQiBaseData
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
,
operationModel
:
number
,
foundingTeam
:
number
,
type
:
Number
)
{
export
async
function
outPutFuHuaQiBaseData
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
,
operationModel
:
number
,
foundingTeam
:
number
,
name
:
string
,
type
:
Number
)
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
/**当选择了当前数据时 拼接查询条件 */
/**当选择了当前数据时 拼接查询条件 */
let
selectParam
:
any
=
{};
if
(
lv
)
{
if
(
lv
)
{
eccEnumValue
(
"管理后台查询孵化器列表"
,
" 孵化器级别 "
,
configEnum
.
FUHUAQILV
,
lv
);
eccEnumValue
(
"管理后台查询孵化器列表"
,
" 孵化器级别 "
,
configEnum
.
FUHUAQILV
,
lv
);
selectParam
.
lv
=
lv
;
selectParam
.
lv
=
lv
;
...
@@ -135,6 +138,9 @@ export async function outPutFuHuaQiBaseData(lv:number, institutionalNature:numbe
...
@@ -135,6 +138,9 @@ export async function outPutFuHuaQiBaseData(lv:number, institutionalNature:numbe
eccEnumValue
(
"管理后台查询孵化器列表"
,
" 创业团队 "
,
configEnum
.
TEAM
,
foundingTeam
);
eccEnumValue
(
"管理后台查询孵化器列表"
,
" 创业团队 "
,
configEnum
.
TEAM
,
foundingTeam
);
selectParam
.
foundingTeamType
=
foundingTeam
;
selectParam
.
foundingTeamType
=
foundingTeam
;
}
}
if
(
name
)
{
selectParam
.
operationName
=
{
"$regex"
:
`
${
name
}
`
};
}
}
}
let
enterpriseMap
=
await
groupFindEnterpriseCount
();
//计算所有孵化器拥有的企业总数
let
enterpriseMap
=
await
groupFindEnterpriseCount
();
//计算所有孵化器拥有的企业总数
...
@@ -369,7 +375,7 @@ export async function fuHuaQiScore(time:number, name:string, page:number) {
...
@@ -369,7 +375,7 @@ export async function fuHuaQiScore(time:number, name:string, page:number) {
scoreDataList
.
forEach
((
info
)
=>
{
scoreDataList
.
forEach
((
info
)
=>
{
let
name
=
nameMap
[
info
.
uscc
]
let
name
=
nameMap
[
info
.
uscc
]
if
(
!
name
)
return
;
if
(
!
name
)
return
;
let
score
=
info
.
startScore
+
info
.
myDataScore
+
info
.
baseDataScore
+
info
.
myEnterpriseScore
+
info
.
taskScore
;
let
score
=
Math
.
ceil
(
info
.
startScore
+
info
.
myDataScore
+
info
.
baseDataScore
+
info
.
myEnterpriseScore
+
info
.
taskScore
)
;
let
star
=
starCount
(
score
);
let
star
=
starCount
(
score
);
rankList
.
push
({
uscc
:
info
.
uscc
,
name
,
star
,
score
});
rankList
.
push
({
uscc
:
info
.
uscc
,
name
,
star
,
score
});
});
});
...
@@ -382,8 +388,9 @@ export async function fuHuaQiScore(time:number, name:string, page:number) {
...
@@ -382,8 +388,9 @@ export async function fuHuaQiScore(time:number, name:string, page:number) {
datList
.
forEach
(
info
=>
{
datList
.
forEach
(
info
=>
{
let
name
=
nameMap
[
info
.
_id
]
let
name
=
nameMap
[
info
.
_id
]
if
(
!
name
)
return
;
if
(
!
name
)
return
;
let
star
=
starCount
(
info
.
maxScore
);
let
score
=
Math
.
ceil
(
info
.
maxScore
);
rankList
.
push
({
uscc
:
info
.
_id
,
name
,
star
,
score
:
info
.
maxScore
});
let
star
=
starCount
(
score
);
rankList
.
push
({
uscc
:
info
.
_id
,
name
,
star
,
score
});
});
});
}
}
...
@@ -443,4 +450,25 @@ export async function outPutFuHuaQiScore(time:number) {
...
@@ -443,4 +450,25 @@ export async function outPutFuHuaQiScore(time:number) {
});
});
return
{
outPutList
,
outPutName
};
return
{
outPutList
,
outPutName
};
}
/**
* 修改孵化器联系人和联系人号码
* @param uscc 孵化器统一信用代码
* @param phone 联系人电话
* @param name 联系人
* @returns
*/
export
async
function
updateFuHuaQiData
(
uscc
:
string
,
phone
:
string
,
name
:
string
)
{
let
fuHuaQiInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
if
(
!
fuHuaQiInfo
)
throw
new
BizError
(
ERRORENUM
.
未找到数据
,
'管理后台修改孵化器信息'
);
fuHuaQiInfo
.
personInCharge
=
name
;
fuHuaQiInfo
.
personInChargePhone
=
phone
;
await
fuHuaQiInfo
.
save
();
return
{
isSuccess
:
true
};
}
}
\ No newline at end of file
src/biz/admin/fuHuaQi/month.ts
View file @
381f01fe
...
@@ -33,7 +33,7 @@ export async function monthTableList(state:number, year:number, month:number, pa
...
@@ -33,7 +33,7 @@ export async function monthTableList(state:number, year:number, month:number, pa
let
dataList
=
[];
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
dataBaseList
.
forEach
(
info
=>
{
let
onceInfo
=
{
let
onceInfo
=
{
operationName
:
operationNameMap
[
info
.
fuHuaQiUscc
],
operationName
:
operationNameMap
[
info
.
fuHuaQiUscc
]
||
''
,
state
:
info
.
draftLock
==
false
?
'未填报'
:
'已填报'
,
state
:
info
.
draftLock
==
false
?
'未填报'
:
'已填报'
,
time
:
`
${
info
.
year
}
年
${
info
.
month
}
月`
,
time
:
`
${
info
.
year
}
年
${
info
.
month
}
月`
,
occupancyRate
:
info
.
occupancyRate
||
'-'
occupancyRate
:
info
.
occupancyRate
||
'-'
...
...
src/config/splitResultConfig.ts
View file @
381f01fe
...
@@ -118,6 +118,8 @@ export const EnterpriseListConfig = {
...
@@ -118,6 +118,8 @@ export const EnterpriseListConfig = {
leasedArea
:{
key
:
"租赁面积(平方米)"
},
leasedArea
:{
key
:
"租赁面积(平方米)"
},
isCreate
:{
key
:
"新注册/新迁入"
},
isCreate
:{
key
:
"新注册/新迁入"
},
mainBusiness
:{
key
:
"主营业务"
},
//主营业务
mainBusiness
:{
key
:
"主营业务"
},
//主营业务
state
:{
key
:
"孵化状态"
},
virtualCause
:{
key
:
"虚拟孵化模式"
}
};
};
...
...
src/routers/admin/enterprise.ts
View file @
381f01fe
...
@@ -18,7 +18,7 @@ export function setRouter(httpServer) {
...
@@ -18,7 +18,7 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/admin/enterprise/affiliationfuhuaqi'
,
checkGuanWeiHuiToken
,
asyncHandler
(
affiliationFuHuaQi
));
httpServer
.
post
(
'/admin/enterprise/affiliationfuhuaqi'
,
checkGuanWeiHuiToken
,
asyncHandler
(
affiliationFuHuaQi
));
httpServer
.
post
(
'/admin/data/output/enterprise'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutEnterpriseData
));
httpServer
.
post
(
'/admin/data/output/enterprise'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutEnterpriseData
));
httpServer
.
post
(
'/admin/data/output/financing'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutFinancingData
));
httpServer
.
post
(
'/admin/data/output/financing'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutFinancingData
));
/**迁出企业 */
/**迁出企业
2.0新加
*/
httpServer
.
post
(
'/admin/enterprise/moveoutlist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
moveOutList
));
httpServer
.
post
(
'/admin/enterprise/moveoutlist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
moveOutList
));
httpServer
.
post
(
'/admin/data/output/moveoutlist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutMoveOutList
));
httpServer
.
post
(
'/admin/data/output/moveoutlist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutMoveOutList
));
...
@@ -31,11 +31,11 @@ export function setRouter(httpServer) {
...
@@ -31,11 +31,11 @@ export function setRouter(httpServer) {
* @param res
* @param res
*/
*/
async
function
getEnterpriseList
(
req
,
res
)
{
async
function
getEnterpriseList
(
req
,
res
)
{
let
reqConf
=
{
createType
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
page
:
'Number'
};
let
reqConf
=
{
name
:
'String'
,
createType
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
state
:
'Number'
,
createTime
:
'Number'
,
page
:
'Number'
};
const
NotMustHaveKeys
=
[
"createType"
,
"fuHuaQiUscc"
,
"industry"
,
"isNaturalPersonHolding"
];
const
NotMustHaveKeys
=
[
"createType"
,
"fuHuaQiUscc"
,
"industry"
,
"isNaturalPersonHolding"
,
"state"
,
"createTime"
,
"name"
];
let
{
createType
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
{
createType
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
state
,
createTime
,
name
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
result
=
await
enterpriseAdminBiz
.
enterpriseList
(
createType
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
);
let
result
=
await
enterpriseAdminBiz
.
enterpriseList
(
createType
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
state
,
createTime
,
name
,
page
);
res
.
success
(
result
);
res
.
success
(
result
);
}
}
...
@@ -73,16 +73,15 @@ async function affiliationFuHuaQi(req, res) {
...
@@ -73,16 +73,15 @@ async function affiliationFuHuaQi(req, res) {
* @param res
* @param res
*/
*/
async
function
outPutEnterpriseData
(
req
,
res
)
{
async
function
outPutEnterpriseData
(
req
,
res
)
{
let
reqConf
=
{
createType
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
type
:
'Number'
};
let
reqConf
=
{
name
:
'String'
,
createType
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
state
:
'Number'
,
createTime
:
'Number'
,
type
:
'Number'
};
const
NotMustHaveKeys
=
[
"createType"
,
"fuHuaQiUscc"
,
"industry"
,
"isNaturalPersonHolding"
];
const
NotMustHaveKeys
=
[
"createType"
,
"fuHuaQiUscc"
,
"industry"
,
"isNaturalPersonHolding"
,
"state"
,
"createTime"
,
"name"
];
let
{
createType
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
type
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
{
createType
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
type
,
state
,
createTime
,
name
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
dataList
=
await
enterpriseAdminBiz
.
outPutEnterpriseData
(
createType
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
type
);
let
dataList
=
await
enterpriseAdminBiz
.
outPutEnterpriseData
(
createType
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
state
,
createTime
,
name
,
type
);
let
n
ame
=
`在孵企业
${
getTimeKey
()}
.xlsx`
;
let
fileN
ame
=
`在孵企业
${
getTimeKey
()}
.xlsx`
;
res
.
success
({
name
,
data
:
dataList
});
res
.
success
({
name
:
fileName
,
data
:
dataList
});
}
}
...
@@ -104,6 +103,12 @@ async function outPutFinancingData(req, res) {
...
@@ -104,6 +103,12 @@ async function outPutFinancingData(req, res) {
}
}
/**
* 迁出企业列表
* 2.0
* @param req
* @param res
*/
async
function
moveOutList
(
req
,
res
)
{
async
function
moveOutList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
page
:
'Number'
};
let
reqConf
=
{
name
:
'String'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
page
:
'Number'
};
const
NotMustHaveKeys
=
[
"name"
,
"fuHuaQiUscc"
,
"industry"
,
"isNaturalPersonHolding"
];
const
NotMustHaveKeys
=
[
"name"
,
"fuHuaQiUscc"
,
"industry"
,
"isNaturalPersonHolding"
];
...
@@ -116,6 +121,12 @@ async function moveOutList(req, res) {
...
@@ -116,6 +121,12 @@ async function moveOutList(req, res) {
}
}
/**
* 导出迁出企业列表
* 2.0
* @param req
* @param res
*/
async
function
outPutMoveOutList
(
req
,
res
)
{
async
function
outPutMoveOutList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
type
:
'Number'
};
let
reqConf
=
{
name
:
'String'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
type
:
'Number'
};
const
NotMustHaveKeys
=
[
"name"
,
"fuHuaQiUscc"
,
"industry"
,
"isNaturalPersonHolding"
];
const
NotMustHaveKeys
=
[
"name"
,
"fuHuaQiUscc"
,
"industry"
,
"isNaturalPersonHolding"
];
...
...
src/routers/admin/fuHuaQi.ts
View file @
381f01fe
...
@@ -20,6 +20,8 @@ export function setRouter(httpServer) {
...
@@ -20,6 +20,8 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/admin/fuhuaqi/adduser'
,
checkGuanWeiHuiToken
,
asyncHandler
(
addUser
));
httpServer
.
post
(
'/admin/fuhuaqi/adduser'
,
checkGuanWeiHuiToken
,
asyncHandler
(
addUser
));
httpServer
.
post
(
'/admin/data/output/fuhuaqi'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutFuHuaQiData
));
httpServer
.
post
(
'/admin/data/output/fuhuaqi'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutFuHuaQiData
));
httpServer
.
post
(
'/admin/data/output/month'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutMonthData
));
httpServer
.
post
(
'/admin/data/output/month'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutMonthData
));
/**2.0新加 */
httpServer
.
post
(
'/admin/fuhuaqi/updateuserinfo'
,
checkGuanWeiHuiToken
,
asyncHandler
(
updateUserInfo
));
}
}
...
@@ -31,17 +33,18 @@ export function setRouter(httpServer) {
...
@@ -31,17 +33,18 @@ export function setRouter(httpServer) {
*/
*/
async
function
fuHuaQiBaseList
(
req
,
res
)
{
async
function
fuHuaQiBaseList
(
req
,
res
)
{
let
reqConf
=
{
let
reqConf
=
{
lv
:
'Number'
,
lv
:
'Number'
,
name
:
'String'
,
institutionalNature
:
'Number'
,
//机构性质
institutionalNature
:
'Number'
,
//机构性质
operationModel
:
"Number"
,
//运营模式
operationModel
:
"Number"
,
//运营模式
foundingTeam
:
"Number"
,
//创业团队
foundingTeam
:
"Number"
,
//创业团队
industry
:
'Number'
,
industry
:
'Number'
,
page
:
'Number'
page
:
'Number'
};
};
const
NotMustHaveKeys
=
[
"lv"
,
"institutionalNature"
,
"operationModel"
,
"foundingTeam"
,
"industry"
];
const
NotMustHaveKeys
=
[
"lv"
,
"institutionalNature"
,
"operationModel"
,
"foundingTeam"
,
"industry"
,
"name"
];
let
{
lv
,
institutionalNature
,
industry
,
operationModel
,
foundingTeam
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
{
lv
,
institutionalNature
,
industry
,
operationModel
,
foundingTeam
,
name
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
result
=
await
fuHuaQiAdminBiz
.
fuHuaQiBaseList
(
lv
,
institutionalNature
,
industry
,
operationModel
,
foundingTeam
,
page
);
let
result
=
await
fuHuaQiAdminBiz
.
fuHuaQiBaseList
(
lv
,
institutionalNature
,
industry
,
operationModel
,
foundingTeam
,
name
,
page
);
res
.
success
(
result
);
res
.
success
(
result
);
}
}
...
@@ -107,15 +110,15 @@ async function addUser(req, res) {
...
@@ -107,15 +110,15 @@ async function addUser(req, res) {
async
function
outPutFuHuaQiData
(
req
,
res
)
{
async
function
outPutFuHuaQiData
(
req
,
res
)
{
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
industry
:
'Number'
,
type
:
'Number'
,
operationModel
:
"Number"
,
foundingTeam
:
"Number"
};
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
industry
:
'Number'
,
type
:
'Number'
,
operationModel
:
"Number"
,
foundingTeam
:
"Number"
,
name
:
"String"
};
const
NotMustHaveKeys
=
[
"lv"
,
"institutionalNature"
,
"industry"
,
"operationModel"
,
"foundingTeam"
];
const
NotMustHaveKeys
=
[
"lv"
,
"institutionalNature"
,
"industry"
,
"operationModel"
,
"foundingTeam"
,
"name"
];
let
{
lv
,
institutionalNature
,
industry
,
type
,
operationModel
,
foundingTeam
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
{
lv
,
institutionalNature
,
industry
,
type
,
operationModel
,
foundingTeam
,
name
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
dataList
=
await
fuHuaQiAdminBiz
.
outPutFuHuaQiBaseData
(
lv
,
institutionalNature
,
industry
,
operationModel
,
foundingTeam
,
type
);
let
dataList
=
await
fuHuaQiAdminBiz
.
outPutFuHuaQiBaseData
(
lv
,
institutionalNature
,
industry
,
operationModel
,
foundingTeam
,
name
,
type
);
let
n
ame
=
`孵化器列表
${
getTimeKey
()}
.xlsx`
;
let
fileN
ame
=
`孵化器列表
${
getTimeKey
()}
.xlsx`
;
res
.
success
({
name
,
data
:
dataList
});
res
.
success
({
name
:
fileName
,
data
:
dataList
});
}
}
...
@@ -128,8 +131,18 @@ async function outPutMonthData(req, res) {
...
@@ -128,8 +131,18 @@ async function outPutMonthData(req, res) {
let
dataList
=
await
monthAdminBiz
.
outPutMonthTableList
(
state
,
year
,
month
,
type
);
let
dataList
=
await
monthAdminBiz
.
outPutMonthTableList
(
state
,
year
,
month
,
type
);
let
name
=
`月度任务
${
getTimeKey
()}
.xlsx`
;
let
name
=
`月度任务
${
getTimeKey
()}
.xlsx`
;
res
.
success
({
name
,
data
:
dataList
});
res
.
success
({
name
,
data
:
dataList
});
}
async
function
updateUserInfo
(
req
,
res
)
{
let
reqConf
=
{
uscc
:
'String'
,
phone
:
'String'
,
name
:
'String'
};
const
NotMustHaveKeys
=
[];
let
{
uscc
,
phone
,
name
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
result
=
await
fuHuaQiAdminBiz
.
updateFuHuaQiData
(
uscc
,
phone
,
name
);
res
.
success
(
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