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
d5ec5b54
Commit
d5ec5b54
authored
Feb 16, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7e8cac28
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
312 additions
and
45 deletions
+312
-45
base.ts
src/biz/fuHuqQi/base.ts
+81
-6
user.ts
src/biz/fuHuqQi/user.ts
+5
-1
checkParamConfig.ts
src/config/checkParamConfig.ts
+26
-15
enum.ts
src/config/enum.ts
+62
-12
ojbectResultKeyConfig.ts
src/config/ojbectResultKeyConfig.ts
+19
-5
fuhuaqi.ts
src/data/fuHuaQi/fuhuaqi.ts
+14
-0
admin.ts
src/routers/admin.ts
+7
-1
fuhuaqi.ts
src/routers/fuhuaqi.ts
+39
-4
public.ts
src/routers/public.ts
+59
-1
No files found.
src/biz/fuHuqQi/base.ts
View file @
d5ec5b54
...
...
@@ -4,12 +4,12 @@
* 孵化器相关逻辑 包括孵化器的增删改查
*
*/
import
{
BaseParamUpdateConfig
}
from
"../../config/checkParamConfig"
;
import
{
BaseParamUpdateConfig
,
OrganizationParamUpdateConfig
}
from
"../../config/checkParamConfig"
;
import
{
findEnterpriseCount
,
findEnterpriseCountByFuHuaQiUscc
,
groupFindEnterprise
}
from
"../../data/enterprise/enterprise"
;
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
,
OUTPUTTYPE
}
from
"../../config/enum"
;
import
{
FuHuaQiHomeDataConfig
,
FuHuaQiBaseListConfig
,
FuHuaQiBaseDataConfig
,
OrganizationBaseDataConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
DEGREE
,
FUHUAINDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
FUHUAQILV
,
INSTITUTIONALNATURE
,
OPERATIONMODEL
,
OUTPUTTYPE
,
SEX
,
TEAM
}
from
"../../config/enum"
;
import
{
extractData
}
from
"../../util/tools"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
...
...
@@ -56,6 +56,21 @@ export async function selectFuHuaQiBaseData(uscc:string) {
/**
* 孵化器机构信息数据数据
* 小程序端 点击机构信息之后拉取的详细数据
* @param uscc 孵化器统一信用代码
* @returns data 基础数据字段
*/
export
async
function
selectOrganizationInfo
(
uscc
:
string
)
{
let
dataBaseInfo
=
await
findFuHuaQiByUSCC
(
uscc
);
let
data
:
any
=
extractData
(
OrganizationBaseDataConfig
,
dataBaseInfo
,
false
);
return
data
;
}
/**
* 更新孵化器基础数据
* 小程序端
* @param uscc 孵化器统一信用代码
...
...
@@ -64,8 +79,7 @@ export async function selectFuHuaQiBaseData(uscc:string) {
*/
export
async
function
updateFuHuaQiBaseData
(
uscc
:
string
,
param
)
{
let
skipKeyList
=
[
"name"
,
"virtualEnterpriseNum"
,
"logonTime"
,
"incubatedAcreage"
,
"acreageTotal"
,
"acreagePersonalUse"
,
"lv"
,
"identificationTime"
,
"industry"
,
"institutionalNature"
,
"liaison"
,
"liaisonPhone"
,
"personInCharge"
,
"personInChargePhone"
,
"hatchingGround"
"virtualEnterpriseNum"
,
"incubatedAcreage"
,
"acreageTotal"
,
"acreagePersonalUse"
,
"hatchingGround"
];
tools
.
checkParamater
(
"更新孵化器基础数据"
,
BaseParamUpdateConfig
,
param
,
skipKeyList
);
...
...
@@ -81,12 +95,44 @@ export async function updateFuHuaQiBaseData(uscc:string, param) {
}
}
/
/todo 这里有个bug
/
**这里无法判断数组里面的内容是否有变化 所以 hatchingGround 直接赋值 */
let
changeList
=
tools
.
checkChange
(
param
,
baseDataInfo
);
for
(
let
i
=
0
;
i
<
changeList
.
length
;
i
++
)
{
let
key
=
changeList
[
i
];
baseDataInfo
[
key
]
=
param
[
key
];
}
baseDataInfo
[
"hatchingGround"
]
=
param
.
hatchingGround
;
await
baseDataInfo
.
save
();
return
{
isSuccess
:
true
};
}
/**
* 更新孵化器机构信息数据
* 小程序端
* @param uscc 孵化器统一信用代码
* @param param 表单内容
* @returns {isSuccess:true/false};
*/
export
async
function
updateOrganizationData
(
uscc
:
string
,
param
)
{
let
skipKeyList
=
[
"virtualEnterpriseNum"
,
"hatchingGround"
,
"operationModelDes"
//todo 写到这里了 这里和甘明讨论好哪些是必填的
];
tools
.
checkParamater
(
"更新孵化器基础数据"
,
OrganizationParamUpdateConfig
,
param
,
skipKeyList
);
let
baseDataInfo
=
await
findFuHuaQiByUSCC
(
uscc
);
/**这里无法判断数组里面的内容是否有变化 所以 hatchingGround 直接赋值 */
let
changeList
=
tools
.
checkChange
(
param
,
baseDataInfo
);
for
(
let
i
=
0
;
i
<
changeList
.
length
;
i
++
)
{
let
key
=
changeList
[
i
];
if
(
key
==
"operationName"
||
key
==
"uscc"
)
continue
;
baseDataInfo
[
key
]
=
param
[
key
];
}
baseDataInfo
[
"foundingTeam"
]
=
param
.
foundingTeam
;
await
baseDataInfo
.
save
();
...
...
@@ -135,6 +181,22 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
changeData
.
lv
=
tools
.
changeEnumValue
(
FUHUAQILV
,
changeData
.
lv
);
changeData
.
industry
=
tools
.
changeEnumValue
(
FUHUAINDUSTRY
,
changeData
.
industry
);
changeData
.
institutionalNature
=
tools
.
changeEnumValue
(
INSTITUTIONALNATURE
,
changeData
.
institutionalNature
);
changeData
.
operationModel
=
tools
.
changeEnumValue
(
OPERATIONMODEL
,
changeData
.
operationModel
);
if
(
changeData
.
operationModel
==
"_投资__孵化_类型"
){
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"__"
,
"+"
);
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"_"
,
"+"
);
}
changeData
.
foundingTeamStr
=
"无"
;
if
(
changeData
.
foundingTeam
&&
changeData
.
foundingTeam
.
length
)
{
changeData
.
foundingTeam
.
forEach
(
item
=>
{
item
.
type
=
changeData
(
TEAM
,
item
.
type
);
//人才类型
item
.
memberSex
=
changeData
(
SEX
,
item
.
memberSex
);
//成员性别
item
.
memberDEGREE
=
changeData
(
DEGREE
,
item
.
memberDEGREE
);
//成员最高学历
/* 这里兼容了一下,团队类型数据库里存到了每一个人的信息里 以防后续要修改 */
changeData
.
foundingTeamStr
=
item
.
type
;
});
}
dataList
.
push
(
changeData
);
});
...
...
@@ -178,6 +240,19 @@ export async function outPutFuHuaQiBaseData(lv:number, institutionalNature:numbe
changeData
.
lv
=
tools
.
changeEnumValue
(
FUHUAQILV
,
changeData
.
lv
);
changeData
.
industry
=
tools
.
changeEnumValue
(
FUHUAINDUSTRY
,
changeData
.
industry
);
changeData
.
institutionalNature
=
tools
.
changeEnumValue
(
INSTITUTIONALNATURE
,
changeData
.
institutionalNature
);
changeData
.
operationModel
=
tools
.
changeEnumValue
(
OPERATIONMODEL
,
changeData
.
operationModel
);
if
(
changeData
.
operationModel
==
"_投资__孵化_类型"
){
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"__"
,
"+"
);
changeData
.
operationModel
=
changeData
.
operationModel
.
replace
(
"_"
,
"+"
);
}
if
(
changeData
.
foundingTeam
&&
changeData
.
foundingTeam
.
length
)
{
changeData
.
foundingTeam
.
forEach
(
item
=>
{
item
.
type
=
changeData
(
TEAM
,
item
.
type
);
//人才类型
item
.
memberSex
=
changeData
(
SEX
,
item
.
memberSex
);
//成员性别
item
.
memberDEGREE
=
changeData
(
DEGREE
,
item
.
memberDEGREE
);
//成员最高学历
});
}
dataList
.
push
(
changeData
);
});
...
...
src/biz/fuHuqQi/user.ts
View file @
d5ec5b54
...
...
@@ -97,9 +97,13 @@ export async function changePassword(uscc:string, pwd:string, newPwd:string) {
* @param uscc 信用代码
* @returns {isSuccess:true/false}
*/
export
async
function
logout
(
uscc
:
string
)
:
Promise
<
object
>
{
export
async
function
logout
(
uscc
:
string
){
if
(
typeof
uscc
!=
"string"
)
throw
new
BizError
(
ERRORENUM
.
参数错误
,
uscc
);
let
fuhuaqiInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
fuhuaqiInfo
.
token
=
""
;
fuhuaqiInfo
.
tokenMs
=
0
;
await
fuhuaqiInfo
.
save
();
return
{
isSuccess
:
true
};
}
...
...
src/config/checkParamConfig.ts
View file @
d5ec5b54
...
...
@@ -7,21 +7,32 @@
* 更新孵化器基础数据的表单配置
*/
export
const
BaseParamUpdateConfig
=
{
name
:
"String"
,
virtualEnterpriseNum
:
"Number"
,
logonTime
:
"Number"
,
incubatedAcreage
:
"Number"
,
acreageTotal
:
"Number"
,
acreagePersonalUse
:
"Number"
,
lv
:
"Number"
,
identificationTime
:
"Number"
,
industry
:
"[Number]"
,
institutionalNature
:
"Number"
,
liaison
:
"String"
,
liaisonPhone
:
"String"
,
personInCharge
:
"String"
,
personInChargePhone
:
"String"
,
hatchingGround
:
"[Object]"
,
virtualEnterpriseNum
:
"Number"
,
//虚拟企业数量
incubatedAcreage
:
"Number"
,
//在孵面积(㎡)
acreageTotal
:
"Number"
,
//孵化器总面积(㎡)
acreagePersonalUse
:
"Number"
,
//孵化器自用面积(㎡)
hatchingGround
:
"[Object]"
,
//经备案孵化场地
};
/**
* 更新孵化器机构信息数据的表单配置
*/
export
const
OrganizationParamUpdateConfig
=
{
name
:
"String"
,
// {key:"名称"},
operationName
:
"String"
,
// {key:"运营机构名称"},
uscc
:
"String"
,
// {key:"统一信用代码"},
logonTime
:
"Number"
,
// {key:"注册时间", changeDate:true},
lv
:
"Number"
,
// {key:"孵化器级别"},
identificationTime
:
"Number"
,
// {key:"认定时间", changeDate:true},
industry
:
"[Number]"
,
// {key:"孵化领域"},
institutionalNature
:
"Number"
,
// {key:"机构性质"},
operationModel
:
"[Number]"
,
// {key:"运营模式"},//新加
foundingTeam
:
"[Object]"
,
// {key:"创始团队"},//新加
liaison
:
"String"
,
// {key:"联系人"},
liaisonPhone
:
"String"
,
// {key:"联系电话"},
personInCharge
:
"String"
,
// {key:"负责人"},
personInChargePhone
:
"String"
,
// {key:"负责人联系电话"},
operationModelDes
:
"String"
,
//运营模式描述
};
...
...
src/config/enum.ts
View file @
d5ec5b54
...
...
@@ -12,11 +12,37 @@ export enum TASKTYPEENUM {
* 孵化器级别
*/
export
enum
FUHUAQILV
{
国家级
=
1
,
市级
,
国家级众创空间
=
1
,
市级众创空间
,
国家级孵化器
,
市级孵化器
,
区级
}
/**
* 孵化器创业团队
*/
export
enum
TEAM
{
无
=
1
,
国际一流人才
,
国内一流人才
}
/**
* 运营模式
*/
export
enum
OPERATIONMODEL
{
链接国际资源类型
=
1
,
深挖科研创新资源类型
,
_
投资
__
孵化
_
类型
,
搭建行业共性技术创新平台类型
,
推动未来产业集聚类型
,
其他
,
}
/**
* 孵化器机构性质
*/
...
...
@@ -40,11 +66,14 @@ export enum FUHUAQILNVESTMENTSTYLE {
* 孵化器孵化领域
*/
export
enum
FUHUAINDUSTRY
{
综合型
=
1
,
信息技术
,
集成电路
=
1
,
生物医药
,
集成电路
,
人工智能
,
人工智能及智能制造
,
航空航天
,
汽车产业
,
软件和信息服务业
,
低碳环保及新材料
,
综合
,
文化创意
}
...
...
@@ -52,13 +81,15 @@ export enum FUHUAINDUSTRY{
* 行业领域
*/
export
enum
INDUSTRY
{
集成电路
=
1
,
集成电路
=
1
,
生物医药
,
人工智能
,
新材料及新能源
,
信息技术
,
文化创意
,
其他
人工智能及智能制造
,
航空航天
,
汽车产业
,
软件和信息服务业
,
低碳环保及新材料
,
综合
,
文化创意
}
...
...
@@ -86,4 +117,22 @@ export enum OUTPUTDATATYPE {
月度出租率
,
在孵企业
,
融资企业
}
/**
* 最高学历
*/
export
enum
DEGREE
{
本科
=
1
,
硕士
,
博士
}
/**
* 性别
*/
export
enum
SEX
{
男
=
1
,
女
}
\ No newline at end of file
src/config/ojbectResultKeyConfig.ts
View file @
d5ec5b54
...
...
@@ -20,6 +20,8 @@ export const FuHuaQiBaseListConfig = {
personInCharge
:{
key
:
"负责人"
},
personInChargePhone
:{
key
:
"负责人联系电话"
},
hatchingGround
:{
key
:
"经备案孵化场地"
},
foundingTeam
:{
key
:
"创业团队"
},
operationModel
:{
key
:
"运营模式"
},
};
/**
...
...
@@ -134,21 +136,32 @@ export const FuHuaQiHomeDataConfig = {
* 小程序孵化器详细数据
*/
export
const
FuHuaQiBaseDataConfig
=
{
name
:{
key
:
"名称"
},
operationName
:{
key
:
"运营机构名称"
},
uscc
:{
key
:
"统一信用代码"
},
virtualEnterpriseNum
:{
key
:
"虚拟企业数量"
},
logonTime
:{
key
:
"注册时间"
,
changeDate
:
true
},
incubatedAcreage
:{
key
:
"在孵面积"
},
acreageTotal
:{
key
:
"孵化器总面积"
},
acreagePersonalUse
:{
key
:
"/孵化器自用面积"
},
hatchingGround
:{
key
:
"经备案孵化场地"
}
}
/**
* 机构信息
*/
export
const
OrganizationBaseDataConfig
=
{
name
:{
key
:
"名称"
},
operationName
:{
key
:
"运营机构名称"
},
uscc
:{
key
:
"统一信用代码"
},
logonTime
:{
key
:
"注册时间"
,
changeDate
:
true
},
lv
:{
key
:
"孵化器级别"
},
identificationTime
:{
key
:
"认定时间"
,
changeDate
:
true
},
industry
:{
key
:
"孵化领域"
},
institutionalNature
:{
key
:
"机构性质"
},
operationModel
:{
key
:
"运营模式"
},
//新加
foundingTeam
:{
key
:
"创始团队"
},
//新加
liaison
:{
key
:
"联系人"
},
liaisonPhone
:{
key
:
"联系电话"
},
personInCharge
:{
key
:
"负责人"
},
personInChargePhone
:{
key
:
"负责人联系电话"
},
hatchingGround
:{
key
:
"经备案孵化场地"
}
operationModelDes
:{
key
:
"运营模式描述"
}
// hatchingGround:{key:"经备案孵化场地"}
}
\ No newline at end of file
src/data/fuHuaQi/fuhuaqi.ts
View file @
d5ec5b54
...
...
@@ -10,12 +10,23 @@
import
{
Schema
}
from
'mongoose'
;
import
{
baseDB
}
from
'../../db/mongo/dbInit'
;
const
foundingTeamSchema
=
new
Schema
({
type
:
Number
,
//人才类型
memberName
:
String
,
//成员姓名
memberSex
:
Number
,
//成员性别
memberAge
:
Number
,
//成员年龄
memberDEGREE
:
Number
,
//成员最高学历
memberSchool
:
String
,
//毕业学校
des
:
String
,
//履历描述
});
const
hatchingGroundSchema
=
new
Schema
({
personInChargeAdd
:
String
,
//孵化场地地址
siteAcreage
:
Number
,
//孵化场地面积(㎡)
leasePrice
:
Number
,
//孵化场地出租单价
});
const
fuHuaQiSchema
=
new
Schema
({
name
:
{
type
:
String
,
index
:
true
},
//名称
operationName
:
String
,
//运营机构名称 不可修改
...
...
@@ -34,6 +45,9 @@ const fuHuaQiSchema = new Schema({
personInCharge
:
String
,
//负责人
personInChargePhone
:
String
,
//负责人联系电话
hatchingGround
:{
type
:[
hatchingGroundSchema
],
default
:[]
},
//经备案孵化场地
foundingTeam
:{
type
:[
foundingTeamSchema
],
default
:[]},
//创业团队
operationModel
:{
type
:[
Number
],
default
:[]},
//运营模式
operationModelDes
:
String
,
//运营模式描述
/**登录相关 */
pwd
:
String
,
//登录密码
token
:{
type
:
String
,
index
:
true
},
...
...
src/routers/admin.ts
View file @
d5ec5b54
...
...
@@ -53,7 +53,13 @@ async function login(req, res) {
* @param res
*/
async
function
fuHuaQiBaseList
(
req
,
res
)
{
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
industry
:
'Number'
,
page
:
'Number'
};
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
//机构性质
operationModel
:
"Number"
,
//运营模式
foundingTeam
:
"Number"
,
//创业团队
industry
:
'Number'
,
page
:
'Number'
};
let
{
lv
,
institutionalNature
,
industry
,
page
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
result
=
await
baseBiz
.
fuHuaQiBaseList
(
lv
,
institutionalNature
,
industry
,
page
);
...
...
src/routers/fuhuaqi.ts
View file @
d5ec5b54
...
...
@@ -13,29 +13,28 @@ import { checkFuHuaQiToken } from '../middleware/user';
export
function
setRouter
(
httpServer
)
{
httpServer
.
post
(
'/fuhuaqi/login'
,
asyncHandler
(
login
));
httpServer
.
post
(
'/fuhuaqi/logout'
,
checkFuHuaQiToken
,
asyncHandler
(
logout
));
httpServer
.
post
(
'/fuhuaqi/login/firstupdate'
,
checkFuHuaQiToken
,
asyncHandler
(
firstUpdatePwd
));
/**基础数据 */
httpServer
.
post
(
'/fuhuaqi/base'
,
checkFuHuaQiToken
,
asyncHandler
(
baseInfo
));
httpServer
.
post
(
'/fuhuaqi/mydata'
,
checkFuHuaQiToken
,
asyncHandler
(
myDataInfo
));
httpServer
.
post
(
'/fuhuaqi/base/update'
,
checkFuHuaQiToken
,
asyncHandler
(
updateMyDataInfo
));
httpServer
.
post
(
'/fuhuaqi/organization/info'
,
checkFuHuaQiToken
,
asyncHandler
(
organizationInfo
));
//机构信息
httpServer
.
post
(
'/fuhuaqi/organization/update'
,
checkFuHuaQiToken
,
asyncHandler
(
updateOrganizationInfo
));
//修改机构信息
/**任务 */
httpServer
.
post
(
'/fuhuaqi/task/list'
,
checkFuHuaQiToken
,
asyncHandler
(
taskList
));
httpServer
.
post
(
'/fuhuaqi/task/submit'
,
checkFuHuaQiToken
,
asyncHandler
(
submitTask
));
/**月度报表 */
httpServer
.
post
(
'/fuhuaqi/month/addreport'
,
checkFuHuaQiToken
,
asyncHandler
(
addReport
));
httpServer
.
post
(
'/fuhuaqi/month/updatereport'
,
checkFuHuaQiToken
,
asyncHandler
(
updateReport
));
httpServer
.
post
(
'/fuhuaqi/month/deletereport'
,
checkFuHuaQiToken
,
asyncHandler
(
deleteReport
));
httpServer
.
post
(
'/fuhuaqi/month/select'
,
checkFuHuaQiToken
,
asyncHandler
(
selectMonthInfo
));
/**融资企业填报 */
httpServer
.
post
(
'/fuhuaqi/financing/create'
,
checkFuHuaQiToken
,
asyncHandler
(
createFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/update'
,
checkFuHuaQiToken
,
asyncHandler
(
updateFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/select'
,
checkFuHuaQiToken
,
asyncHandler
(
selectEnterpriseFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/delete'
,
checkFuHuaQiToken
,
asyncHandler
(
delEnterpriseFinancingInfo
));
httpServer
.
post
(
'/admin/financing/namelist'
,
checkFuHuaQiToken
,
asyncHandler
(
getFinancingInfoByName
));
/**新注册或迁入企业 */
httpServer
.
post
(
'/fuhuaqi/enterprise/register'
,
checkFuHuaQiToken
,
asyncHandler
(
registerEnterprise
));
httpServer
.
post
(
'/fuhuaqi/enterprise/updateregister'
,
checkFuHuaQiToken
,
asyncHandler
(
updateRegisterEnterprise
));
...
...
@@ -43,9 +42,45 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/fuhuaqi/enterprise/updatemove'
,
checkFuHuaQiToken
,
asyncHandler
(
updateMoveInEnterprise
));
httpServer
.
post
(
'/fuhuaqi/enterprise/select'
,
checkFuHuaQiToken
,
asyncHandler
(
selectEnterpriseInfo
));
httpServer
.
post
(
'/fuhuaqi/enterprise/delete'
,
checkFuHuaQiToken
,
asyncHandler
(
delEnterpriseInfo
));
}
/**
*
*/
async
function
logout
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
userBiz
.
logout
(
Uscc
);
res
.
success
(
result
);
}
/**
* 机构信息
*/
async
function
organizationInfo
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
let
userInfo
=
await
baseBiz
.
selectOrganizationInfo
(
Uscc
);
res
.
success
(
userInfo
);
}
/**
* 修改机构信息
*/
async
function
updateOrganizationInfo
(
req
,
res
)
{
let
reqConf
=
{
form
:
'Object'
};
let
{
form
}
=
checkReqParam
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
baseBiz
.
updateOrganizationData
(
Uscc
,
form
);
res
.
success
(
result
);
}
/**
* 创建企业融资信息
* @param req
...
...
src/routers/public.ts
View file @
d5ec5b54
...
...
@@ -3,7 +3,7 @@
*/
import
*
as
asyncHandler
from
'express-async-handler'
;
import
{
FUHUAQILV
,
INSTITUTIONALNATURE
,
FUHUAINDUSTRY
,
INDUSTRY
,
FUHUAQILNVESTMENTSTYLE
}
from
'../config/enum'
;
import
{
FUHUAQILV
,
INSTITUTIONALNATURE
,
FUHUAINDUSTRY
,
INDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
OPERATIONMODEL
,
TEAM
,
DEGREE
}
from
'../config/enum'
;
import
{
checkFuHuaQiToken
}
from
'../middleware/user'
;
export
function
setRouter
(
httpServer
)
{
...
...
@@ -12,8 +12,66 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/public/fuhuaqiindustry'
,
asyncHandler
(
getFuHuaQiIndustry
));
httpServer
.
post
(
'/public/industry'
,
asyncHandler
(
getIndustry
));
httpServer
.
post
(
'/public/investmentstyle'
,
asyncHandler
(
getFuHuaQiInvestmentStyle
));
httpServer
.
post
(
'/public/operationmodel'
,
asyncHandler
(
operationModel
));
httpServer
.
post
(
'/public/fuhuaqiteam'
,
asyncHandler
(
fuHuaQiTeam
));
httpServer
.
post
(
'/public/degree'
,
asyncHandler
(
degree
));
}
/**
* 最高学历
* @param req
* @param res
*/
export
function
degree
(
req
,
res
)
{
let
degreeList
=
[];
for
(
let
key
in
DEGREE
)
{
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
degreeList
.
push
({
key
,
value
:
DEGREE
[
key
]});
}
}
res
.
success
({
degreeList
});
}
/**
* 获取运营模式列表
* @param req
* @param res
*/
export
function
operationModel
(
req
,
res
)
{
let
operationModelList
=
[];
for
(
let
key
in
OPERATIONMODEL
)
{
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
let
keyStr
=
key
;
if
(
parseInt
(
OPERATIONMODEL
[
key
])
==
OPERATIONMODEL
.
_
投资
__
孵化
_
类型
)
{
keyStr
=
keyStr
.
replace
(
"__"
,
"+"
);
keyStr
=
keyStr
.
replace
(
"_"
,
"+"
);
}
operationModelList
.
push
({
key
:
keyStr
,
value
:
OPERATIONMODEL
[
key
]});
}
}
res
.
success
({
operationModelList
});
}
/**
* 孵化器创业团队
* @param req
* @param res
*/
export
function
fuHuaQiTeam
(
req
,
res
)
{
let
teamList
=
[];
for
(
let
key
in
TEAM
)
{
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
teamList
.
push
({
key
,
value
:
TEAM
[
key
]});
}
}
res
.
success
({
teamList
});
}
/**
* 获取孵化器等级列表
* @param req
...
...
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