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
1b0947f1
Commit
1b0947f1
authored
Feb 10, 2023
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
8916c216
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
13 deletions
+75
-13
financing.ts
src/biz/enterprise/financing.ts
+2
-2
user.ts
src/biz/fuHuqQi/user.ts
+16
-3
checkParamConfig.ts
src/config/checkParamConfig.ts
+31
-3
errorEnum.ts
src/config/errorEnum.ts
+2
-1
ojbectResultKeyConfig.ts
src/config/ojbectResultKeyConfig.ts
+1
-1
financing.ts
src/data/enterprise/financing.ts
+1
-1
fuhuaqi.ts
src/data/fuHuaQi/fuhuaqi.ts
+11
-0
admin.ts
src/routers/admin.ts
+10
-1
fuhuaqi.ts
src/routers/fuhuaqi.ts
+1
-1
No files found.
src/biz/enterprise/financing.ts
View file @
1b0947f1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* 包括新融资信息的增删改查
* 包括新融资信息的增删改查
*
*
*/
*/
import
{
FinancingParamConfig
}
from
"../../config/checkParamConfig"
;
import
{
FinancingParamConfig
,
FinancingParamUpdateConfig
}
from
"../../config/checkParamConfig"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
EnterpriseFinancingInfoConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
EnterpriseFinancingInfoConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
createFinancing
,
deleteEnterpriseFinancing
,
findFinancingCount
,
findFinancingInfoByTaskIdAndSucc
,
findFinancingList
,
groupFindFinancing
}
from
"../../data/enterprise/financing"
;
import
{
createFinancing
,
deleteEnterpriseFinancing
,
findFinancingCount
,
findFinancingInfoByTaskIdAndSucc
,
findFinancingList
,
groupFindFinancing
}
from
"../../data/enterprise/financing"
;
...
@@ -52,7 +52,7 @@ export async function createFinancingInfo(uscc:string, param) {
...
@@ -52,7 +52,7 @@ export async function createFinancingInfo(uscc:string, param) {
* @returns {isSuccess:true/false}
* @returns {isSuccess:true/false}
*/
*/
export
async
function
updateFinancingInfo
(
uscc
:
string
,
param
)
{
export
async
function
updateFinancingInfo
(
uscc
:
string
,
param
)
{
checkParamater
(
"更新融资企业信息"
,
FinancingParamConfig
,
param
);
checkParamater
(
"更新融资企业信息"
,
FinancingParam
Update
Config
,
param
);
const
TaskId
=
getTaskId
(
uscc
);
const
TaskId
=
getTaskId
(
uscc
);
let
dataBaseInfo
=
await
findFinancingInfoByTaskIdAndSucc
(
TaskId
,
param
.
uscc
);
let
dataBaseInfo
=
await
findFinancingInfoByTaskIdAndSucc
(
TaskId
,
param
.
uscc
);
...
...
src/biz/fuHuqQi/user.ts
View file @
1b0947f1
...
@@ -4,11 +4,12 @@
...
@@ -4,11 +4,12 @@
* 主要包括有 孵化器账号的登录
* 主要包括有 孵化器账号的登录
* 预留好 重置密码 退出登录 接口
* 预留好 重置密码 退出登录 接口
*/
*/
import
{
FuHuaQiUserConfig
}
from
"../../config/checkParamConfig"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
FuHuaQiListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
FuHuaQiListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
*
as
fuhuaqiData
from
"../../data/fuHuaQi/fuhuaqi"
import
*
as
fuhuaqiData
from
"../../data/fuHuaQi/fuhuaqi"
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
extractData
,
getPwdMd5
,
getToken
}
from
"../../util/tools"
;
import
{
checkChange
,
checkParamater
,
extractData
,
getPwdMd5
,
getToken
}
from
"../../util/tools"
;
/**
/**
...
@@ -136,12 +137,24 @@ export async function logout(uscc:string):Promise<object> {
...
@@ -136,12 +137,24 @@ export async function logout(uscc:string):Promise<object> {
* @param userStatem 是否禁用 true=启用 false=禁用
* @param userStatem 是否禁用 true=启用 false=禁用
* @returns
* @returns
*/
*/
export
async
function
updateState
(
uscc
:
string
,
userState
m
:
boolean
)
{
export
async
function
updateState
(
uscc
:
string
,
userState
:
boolean
)
{
let
fuhuaqiInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
let
fuhuaqiInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
if
(
!
fuhuaqiInfo
)
throw
new
BizError
(
ERRORENUM
.
账号不存在
);
if
(
!
fuhuaqiInfo
)
throw
new
BizError
(
ERRORENUM
.
账号不存在
);
fuhuaqiInfo
.
userState
m
=
userStatem
;
fuhuaqiInfo
.
userState
=
userState
;
await
fuhuaqiInfo
.
save
();
await
fuhuaqiInfo
.
save
();
return
{
isSuccess
:
true
};
return
{
isSuccess
:
true
};
}
}
export
async
function
addUser
(
param
)
{
checkParamater
(
"新增孵化器账号信息"
,
FuHuaQiUserConfig
,
param
);
//校验表单参数
let
fuhuaqiInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
param
.
uscc
);
if
(
fuhuaqiInfo
)
throw
new
BizError
(
ERRORENUM
.
该孵化器账号信息已存在
,
`
${
param
.
uscc
}
`
);
await
fuhuaqiData
.
createFuHuaQiUser
(
param
);
return
{
isSuccess
:
true
};
}
src/config/checkParamConfig.ts
View file @
1b0947f1
...
@@ -60,10 +60,10 @@ export const MoveInEnterpriseParamConfig = {
...
@@ -60,10 +60,10 @@ export const MoveInEnterpriseParamConfig = {
/**
/**
* 融资企业登记表单配置
*
更新
融资企业登记表单配置
*/
*/
export
const
FinancingParamConfig
=
{
export
const
FinancingParam
Update
Config
=
{
//
uscc:"String", //统一信用代码
uscc
:
"String"
,
//统一信用代码
name
:
"String"
,
//企业名称
name
:
"String"
,
//企业名称
logonAdd
:
"String"
,
//注册地址
logonAdd
:
"String"
,
//注册地址
operatingAdd
:
"String"
,
//经营地址
operatingAdd
:
"String"
,
//经营地址
...
@@ -74,3 +74,30 @@ export const FinancingParamConfig = {
...
@@ -74,3 +74,30 @@ export const FinancingParamConfig = {
fuHuaQiInvestmentAmount
:
"Number"
,
//孵化器投资金额(万元)
fuHuaQiInvestmentAmount
:
"Number"
,
//孵化器投资金额(万元)
fuHuaQiInvestmentStyle
:
"Number"
,
//孵化器投资方式
fuHuaQiInvestmentStyle
:
"Number"
,
//孵化器投资方式
};
};
/**
* 创建 融资企业登记表单配置
*/
export
const
FinancingParamConfig
=
{
name
:
"String"
,
//企业名称
logonAdd
:
"String"
,
//注册地址
operatingAdd
:
"String"
,
//经营地址
financingAmount
:
"Number"
,
//融资金额(万元)
investmentInstitutionsName
:
"String"
,
//投资机构名称
timeToObtainInvestment
:
"Number"
,
//获得投资时间
fuHuaQiInvestment
:
"Boolean"
,
//孵化器是否投资
fuHuaQiInvestmentAmount
:
"Number"
,
//孵化器投资金额(万元)
fuHuaQiInvestmentStyle
:
"Number"
,
//孵化器投资方式
};
/**
* 新增孵化器账号配置
*/
export
const
FuHuaQiUserConfig
=
{
operationName
:
"String"
,
//运营机构名称
uscc
:
"String"
,
//营业执照
personInChargePhone
:
"String"
,
//负责人手机号
personInCharge
:
"String"
//负责人
}
\ No newline at end of file
src/config/errorEnum.ts
View file @
1b0947f1
...
@@ -19,7 +19,8 @@ export enum ERRORENUM {
...
@@ -19,7 +19,8 @@ export enum ERRORENUM {
账号不存在
,
账号不存在
,
已入库的数据不能删除
,
已入库的数据不能删除
,
任务不存在
,
任务不存在
,
该企业不存在
该企业不存在
,
该孵化器账号信息已存在
}
}
export
enum
ERRORCODEENUM
{
export
enum
ERRORCODEENUM
{
...
...
src/config/ojbectResultKeyConfig.ts
View file @
1b0947f1
...
@@ -53,7 +53,7 @@ export const EnterpriseFinancingInfoConfig = {
...
@@ -53,7 +53,7 @@ export const EnterpriseFinancingInfoConfig = {
financingAmount
:{
key
:
"融资金额(万元)"
},
//
financingAmount
:{
key
:
"融资金额(万元)"
},
//
investmentInstitutionsName
:{
key
:
"投资机构名称"
},
//
investmentInstitutionsName
:{
key
:
"投资机构名称"
},
//
timeToObtainInvestment
:{
key
:
"获得投资时间"
},
//
timeToObtainInvestment
:{
key
:
"获得投资时间"
},
//
fuHuaQiInvestment
:{
key
:
"
//
孵化器是否投资"
},
fuHuaQiInvestment
:{
key
:
"孵化器是否投资"
},
fuHuaQiInvestmentAmount
:{
key
:
"孵化器投资金额(万元)"
},
//
fuHuaQiInvestmentAmount
:{
key
:
"孵化器投资金额(万元)"
},
//
fuHuaQiInvestmentStyle
:{
key
:
"孵化器投资方式"
},
//
fuHuaQiInvestmentStyle
:{
key
:
"孵化器投资方式"
},
//
};
};
...
...
src/data/enterprise/financing.ts
View file @
1b0947f1
...
@@ -16,7 +16,7 @@ const financingSchema = new Schema({
...
@@ -16,7 +16,7 @@ const financingSchema = new Schema({
operatingAdd
:
String
,
//经营地址
operatingAdd
:
String
,
//经营地址
financingAmount
:
Number
,
//融资金额(万元)
financingAmount
:
Number
,
//融资金额(万元)
investmentInstitutionsName
:
String
,
//投资机构名称
investmentInstitutionsName
:
String
,
//投资机构名称
timeToObtainInvestment
:
String
,
//获得投资时间
timeToObtainInvestment
:
Number
,
//获得投资时间
fuHuaQiInvestment
:{
type
:
Boolean
,
default
:
false
},
//孵化器是否投资
fuHuaQiInvestment
:{
type
:
Boolean
,
default
:
false
},
//孵化器是否投资
fuHuaQiInvestmentAmount
:
Number
,
//孵化器投资金额(万元)
fuHuaQiInvestmentAmount
:
Number
,
//孵化器投资金额(万元)
fuHuaQiInvestmentStyle
:
Number
,
//孵化器投资方式
fuHuaQiInvestmentStyle
:
Number
,
//孵化器投资方式
...
...
src/data/fuHuaQi/fuhuaqi.ts
View file @
1b0947f1
...
@@ -177,3 +177,13 @@ export async function findAllFuHuaQiOperationNameMap() {
...
@@ -177,3 +177,13 @@ export async function findAllFuHuaQiOperationNameMap() {
export
async
function
findAllFuHuaQi
()
{
export
async
function
findAllFuHuaQi
()
{
return
await
fuHuaQiModel
.
find
({
userState
:
false
});
return
await
fuHuaQiModel
.
find
({
userState
:
false
});
}
}
/**
* 添加孵化器账号
* @param param 新增参数
* @returns
*/
export
async
function
createFuHuaQiUser
(
param
)
{
return
await
fuHuaQiModel
.
create
(
param
);
}
\ No newline at end of file
src/routers/admin.ts
View file @
1b0947f1
...
@@ -16,6 +16,7 @@ export function setRouter(httpServer) {
...
@@ -16,6 +16,7 @@ export function setRouter(httpServer) {
// httpServer.post('/admin/fuhuaqi/monthoccupancyrate', asyncHandler());
// httpServer.post('/admin/fuhuaqi/monthoccupancyrate', asyncHandler());
httpServer
.
post
(
'/admin/fuhuaqi/userlist'
,
asyncHandler
(
getFuHuaQiUserList
));
httpServer
.
post
(
'/admin/fuhuaqi/userlist'
,
asyncHandler
(
getFuHuaQiUserList
));
httpServer
.
post
(
'/admin/fuhuaqi/updatestate'
,
asyncHandler
(
updateState
));
httpServer
.
post
(
'/admin/fuhuaqi/updatestate'
,
asyncHandler
(
updateState
));
httpServer
.
post
(
'/admin/fuhuaqi/adduser'
,
asyncHandler
(
addUser
));
/**企业 */
/**企业 */
httpServer
.
post
(
'/admin/enterprise/list'
,
asyncHandler
(
getEnterpriseList
));
httpServer
.
post
(
'/admin/enterprise/list'
,
asyncHandler
(
getEnterpriseList
));
httpServer
.
post
(
'/admin/enterprise/financinglist'
,
asyncHandler
(
getFinancingList
));
httpServer
.
post
(
'/admin/enterprise/financinglist'
,
asyncHandler
(
getFinancingList
));
...
@@ -110,8 +111,16 @@ async function fuHuaQiBaseList(req, res) {
...
@@ -110,8 +111,16 @@ async function fuHuaQiBaseList(req, res) {
let
{
userState
,
uscc
}
=
checkReqParam
(
reqConf
,
req
.
body
);
let
{
userState
,
uscc
}
=
checkReqParam
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
userBiz
.
updateState
(
us
erState
,
uscc
);
let
result
=
await
userBiz
.
updateState
(
us
cc
,
userState
);
res
.
success
(
result
);
res
.
success
(
result
);
}
}
async
function
addUser
(
req
,
res
)
{
let
reqConf
=
{
form
:
'Object'
};
let
{
form
}
=
checkReqParam
(
reqConf
,
req
.
body
);
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
userBiz
.
addUser
(
form
);
res
.
success
(
result
);
}
src/routers/fuhuaqi.ts
View file @
1b0947f1
...
@@ -32,7 +32,7 @@ export function setRouter(httpServer) {
...
@@ -32,7 +32,7 @@ export function setRouter(httpServer) {
/**融资企业填报 */
/**融资企业填报 */
httpServer
.
post
(
'/fuhuaqi/financing/create'
,
checkFuHuaQiToken
,
asyncHandler
(
createFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/create'
,
checkFuHuaQiToken
,
asyncHandler
(
createFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/update'
,
checkFuHuaQiToken
,
asyncHandler
(
updateFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/update'
,
checkFuHuaQiToken
,
asyncHandler
(
updateFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/select'
,
asyncHandler
(
selectEnterpriseFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/select'
,
checkFuHuaQiToken
,
asyncHandler
(
selectEnterpriseFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/delete'
,
checkFuHuaQiToken
,
asyncHandler
(
delEnterpriseFinancingInfo
));
httpServer
.
post
(
'/fuhuaqi/financing/delete'
,
checkFuHuaQiToken
,
asyncHandler
(
delEnterpriseFinancingInfo
));
httpServer
.
post
(
'/admin/financing/namelist'
,
checkFuHuaQiToken
,
asyncHandler
(
getFinancingInfoByName
));
httpServer
.
post
(
'/admin/financing/namelist'
,
checkFuHuaQiToken
,
asyncHandler
(
getFinancingInfoByName
));
...
...
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