Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyiAdminServer
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
yuyiAdminServer
Commits
199d205f
Commit
199d205f
authored
Feb 14, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://123.207.147.179:8888/node_server/yuyiAdminServer
# Conflicts: # src/biz/admin.ts
parents
5750a96d
ca7b2557
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
48 deletions
+89
-48
admin.ts
src/biz/admin.ts
+28
-29
fuhua.ts
src/biz/fuhua.ts
+18
-0
ruFu.ts
src/biz/ruFu.ts
+18
-3
zhengCe.ts
src/biz/zhengCe.ts
+2
-2
enterprise.ts
src/config/eccParam/enterprise.ts
+7
-0
errorEnum.ts
src/config/enum/errorEnum.ts
+3
-1
admin.ts
src/routers/admin.ts
+13
-13
No files found.
src/biz/admin.ts
View file @
199d205f
...
...
@@ -19,7 +19,7 @@ import { changeAdd, extractData } from "../util/piecemeal";
import
{
EnterpriseApplyForConfig
}
from
"../config/splitResult/enterprise"
;
import
{
changeEnumValue
}
from
"../util/verificationEnum"
;
export
async
function
allEntepriseNameList
()
{
export
async
function
allEnte
r
priseNameList
()
{
let
listList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业基础信息表
,
{
state
:
1
},
[
"enterpriseName"
,
"eId"
]);
let
dataList
=
[];
...
...
@@ -83,15 +83,17 @@ export async function updateEnterpriseApplyFor(eId:string, param) {
}
export
async
function
enterpriseExamineList
(
year
:
number
,
entepriseName
:
string
,
page
:
number
)
{
let
selectParam
:
any
=
{};
export
async
function
enterpriseExamineList
(
year
:
number
,
ente
r
priseName
:
string
,
page
:
number
)
{
let
selectParam
:
any
=
{
isSubmit
:
enumConfig
.
STATE
.
是
};
if
(
year
)
selectParam
=
{
annual
:
getMySqlMs
(
year
)};
let
filesList
=
[
"mId"
,
"annual"
,
"BI"
,
"TXP"
,
"RD"
,
"state"
];
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
企业基础信息表
]
=
{
column
:[
"enterpriseName"
],
where
:{}
};
if
(
entepriseName
)
{
manyTableInfo
[
TABLENAME
.
企业基础信息表
].
where
[
"enterpriseName"
]
=
{
"%like%"
:
entepriseName
}
if
(
ente
r
priseName
)
{
manyTableInfo
[
TABLENAME
.
企业基础信息表
].
where
[
"enterpriseName"
]
=
{
"%like%"
:
ente
r
priseName
}
}
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
企业经营信息
,
selectParam
,
filesList
,
manyTableInfo
,
page
);
let
dataCount
=
await
selectData
(
OPERATIONALDATATYPE
.
查询数据量
,
TABLENAME
.
企业经营信息
,
selectParam
,
null
);
...
...
@@ -172,20 +174,16 @@ export async function enterpriseExaminePass(mId) {
export
async
function
enterpriseManageList
(
entepriseName
:
string
,
year
:
number
,
page
:
number
,
state
:
number
)
{
let
selectParam
:
any
=
{};
export
async
function
enterpriseManageList
(
enterpriseName
:
string
,
year
:
number
,
page
:
number
)
{
let
selectParam
:
any
=
{
state
:
1
};
if
(
year
)
{
selectParam
.
annual
=
getMySqlMs
(
year
);
}
if
(
state
)
{
if
(
state
==
1
)
selectParam
.
state
=
1
;
else
selectParam
.
state
=
0
;
}
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
企业基础信息表
]
=
{
column
:
[
"enterpriseName"
,
"uscc"
],
where
:{}
};
if
(
entepriseName
)
{
manyTableInfo
[
TABLENAME
.
企业基础信息表
].
where
[
"enterpriseName"
]
=
{
"%like%"
:
entepriseName
}
if
(
enterpriseName
)
{
manyTableInfo
[
TABLENAME
.
企业基础信息表
].
where
[
"enterpriseName"
]
=
{
"%like%"
:
enterpriseName
}
}
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"mId"
,
"BI"
,
"TXP"
,
"RD"
,
"annual"
,
"state"
],
manyTableInfo
,
page
);
let
dataCountList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"eId"
],
manyTableInfo
);
...
...
@@ -212,7 +210,7 @@ export async function enterpriseManageList(entepriseName:string, year:number, pa
export
async
function
outPutEnterpriseManageList
(
entepriseName
:
string
,
year
:
number
,
state
:
number
,
type
:
number
,
files
)
{
export
async
function
outPutEnterpriseManageList
(
ente
r
priseName
:
string
,
year
:
number
,
state
:
number
,
type
:
number
,
files
)
{
let
selectParam
:
any
=
{};
if
(
type
==
1
)
{
...
...
@@ -227,8 +225,8 @@ export async function outPutEnterpriseManageList(entepriseName:string, year:numb
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
企业基础信息表
]
=
{
column
:
[
"enterpriseName"
,
"uscc"
],
where
:{}
};
if
(
entepriseName
&&
type
==
1
)
{
manyTableInfo
[
TABLENAME
.
企业经营信息
].
where
[
"enterpriseName"
]
=
{
"%like%"
:
entepriseName
}
if
(
ente
r
priseName
&&
type
==
1
)
{
manyTableInfo
[
TABLENAME
.
企业经营信息
].
where
[
"enterpriseName"
]
=
{
"%like%"
:
ente
r
priseName
}
}
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"mId"
,
"BI"
,
"TXP"
,
"RD"
,
"annual"
],
manyTableInfo
);
...
...
@@ -277,17 +275,17 @@ export async function enterpriseManagePass(mId:string) {
//====融资
export
async
function
enterpriseFinancingList
(
entepriseName
:
string
,
page
:
number
)
{
export
async
function
enterpriseFinancingList
(
ente
r
priseName
:
string
,
page
:
number
)
{
let
selectParam
:
any
=
{
state
:
enumConfig
.
STATE
.
是
};
if
(
entepriseName
)
{
selectParam
.
ente
priseName
=
{
"%like%"
:
ente
priseName
}
if
(
ente
r
priseName
)
{
selectParam
.
ente
rpriseName
=
{
"%like%"
:
enter
priseName
}
}
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
企业融资
]
=
{
column
:[
"financingAmount"
,
"financingRounds"
,
"investmentDate"
,
"investmentInstitutionsName"
],
where
:{}
};
let
filesList
=
[
"enterpriseName"
,
"uscc"
];
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
企业基础信息表
,
selectParam
,
filesList
,
manyTableInfo
,
page
);
let
dataCountList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业基础信息表
,
selectParam
,
[
"eId"
]
,
manyTableInfo
);
let
dataCountList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业基础信息表
,
selectParam
,
filesList
,
manyTableInfo
);
let
dataCount
=
dataCountList
.
length
;
let
dataList
=
[];
...
...
@@ -307,12 +305,12 @@ export async function enterpriseFinancingList(entepriseName:string,page:number)
return
{
dataList
,
dataCount
};
}
export
async
function
outPutEnterpriseFinancingList
(
entepriseName
:
string
,
type
:
number
,
files
)
{
export
async
function
outPutEnterpriseFinancingList
(
ente
r
priseName
:
string
,
type
:
number
,
files
)
{
let
selectParam
:
any
=
{
state
:
enumConfig
.
STATE
.
是
};
if
(
type
==
1
)
{
if
(
entepriseName
)
{
selectParam
.
ente
priseName
=
{
"%like%"
:
ente
priseName
}
if
(
ente
r
priseName
)
{
selectParam
.
ente
rpriseName
=
{
"%like%"
:
enter
priseName
}
}
}
...
...
@@ -353,14 +351,15 @@ export async function outPutEnterpriseFinancingList(entepriseName:string, type:n
export
async
function
enterpriseTalentList
(
n
ame
:
string
,
page
:
number
)
{
export
async
function
enterpriseTalentList
(
entepriseN
ame
:
string
,
page
:
number
)
{
let
selectParam
:
any
=
{};
if
(
name
)
{
selectParam
.
name
=
{
"%like%"
:
name
};
}
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
企业基础信息表
]
=
{
column
:[
"enterpriseName"
],
where
:{}
};
if
(
entepriseName
)
{
manyTableInfo
[
TABLENAME
.
企业基础信息表
].
where
[
'enterpriseName'
]
=
{
"%like%"
:
entepriseName
};
}
let
filesList
=
[
"name"
,
"sex"
,
"birth"
,
"degree"
,
"graduationSchool"
];
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
创业团队
,
selectParam
,
filesList
,
manyTableInfo
,
page
);
let
dataCount
=
await
selectData
(
OPERATIONALDATATYPE
.
查询数据量
,
TABLENAME
.
创业团队
,
selectParam
,
null
);
...
...
@@ -552,7 +551,7 @@ export async function enterpriseHonor(enterpriseName, page) {
let
addItem
=
{
uscc
:
enterprise
.
uscc
,
enterpriseName
:
enterprise
.
enterpriseName
,
awardName
,
awardingUnit
,
awardTime
,
awardLevel
:
changeEnumValue
(
enumConfig
.
AWARDLEVEL
,
awardLevel
)
awardName
,
awardingUnit
,
awardTime
:
moment
(
awardTime
).
format
(
"YYYY"
)
,
awardLevel
:
changeEnumValue
(
enumConfig
.
AWARDLEVEL
,
awardLevel
)
};
dataList
.
push
(
addItem
);
...
...
src/biz/fuhua.ts
View file @
199d205f
...
...
@@ -333,6 +333,11 @@ export async function getWorthDate() {
const
FuncName
=
"管理员添加入孵企业"
eccFormParam
(
FuncName
,
AdminRegisterAddConfig
,
param
);
let
userInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业用户表
,
{
phone
:
param
.
phone
},
[
"uId"
]);
if
(
userInfo
&&
userInfo
.
uId
)
throw
new
BizError
(
ERRORENUM
.
手机号码重复
);
let
filesList
=
[
"eId"
];
let
enterpriseUserInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业基础信息表
,
{
uscc
:
param
.
uscc
},
filesList
);
if
(
enterpriseUserInfo
&&
enterpriseUserInfo
.
eId
)
{
...
...
@@ -350,6 +355,16 @@ export async function getWorthDate() {
};
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业基础信息表
,
addEInfo
,
{});
let
addUInfo
=
{
eId
:
addEInfo
.
eId
,
uId
:
randomId
(
TABLEID
.
企业用户表
),
phone
:
param
.
phone
,
pwd
:
param
.
pwd
,
userName
:
param
.
userName
};
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业用户表
,
addUInfo
,
{});
let
fuHuaInfo
=
{
eId
:
addEInfo
.
eId
,
fId
:
randomId
(
TABLEID
.
企业孵化信息
),
...
...
@@ -368,6 +383,9 @@ export async function getWorthDate() {
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
租赁信息
,
leaseInfo
,
{});
return
{
isSuccess
:
true
};
}
...
...
src/biz/ruFu.ts
View file @
199d205f
...
...
@@ -27,6 +27,7 @@ export async function settleInEnterpriseList(page:number, entepriseName:string)
let
manyTableInfo
:
any
=
{}
manyTableInfo
[
TABLENAME
.
租赁信息
]
=
{
column
:[
"area"
,
"unitPrice"
,
"roomNumber"
,
"rent"
],
where
:{}
};
manyTableInfo
[
TABLENAME
.
企业孵化信息
]
=
{
column
:[
"state"
,
"startTime"
,
"endTime"
],
where
:{}
};
manyTableInfo
[
TABLENAME
.
企业用户表
]
=
{
column
:[
"userName"
,
"pwd"
,
"phone"
,
"uId"
],
where
:{}
};
let
resList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
企业基础信息表
,
selectParam
,
filesList
,
manyTableInfo
,
page
);
let
allResList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业基础信息表
,
selectParam
,
[
"eId"
],
manyTableInfo
);
...
...
@@ -46,7 +47,11 @@ export async function settleInEnterpriseList(page:number, entepriseName:string)
unitPrice
:
info
.
enterprise_leases
[
0
].
unitPrice
,
roomNumber
:
info
.
enterprise_leases
[
0
].
roomNumber
,
rent
:
info
.
enterprise_leases
[
0
].
rent
,
logonAddress
:
changeAdd
(
JSON
.
parse
(
info
.
logonAddress
))
logonAddress
:
changeAdd
(
JSON
.
parse
(
info
.
logonAddress
)),
userName
:
info
.
enterprise_users
[
0
].
userName
,
pwd
:
info
.
enterprise_users
[
0
].
pwd
,
phone
:
info
.
enterprise_users
[
0
].
phone
,
uId
:
info
.
enterprise_users
[
0
].
uId
,
});
});
...
...
@@ -62,8 +67,6 @@ export async function settleInEnterprisePass(eId:string) {
}
if
(
resInfo
.
state
)
throw
new
BizError
(
ERRORENUM
.
该企业已通过审核
);
let
updateInfo
=
{
register
:
enumConfig
.
STATE
.
是
,
randomCode
:
randomCode
()
...
...
@@ -76,6 +79,10 @@ export async function settleInEnterprisePass(eId:string) {
export
async
function
settleInEnterpriseUpdate
(
eId
:
string
,
param
)
{
const
FuncName
=
"修改入驻信息"
;
eccFormParam
(
FuncName
,
SettleInForUpdateConfig
,
param
);
let
userInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业用户表
,
{
phone
:
param
.
phone
},
[
"uId"
]);
if
(
userInfo
&&
userInfo
.
uId
&&
userInfo
.
uId
!=
param
.
uId
)
throw
new
BizError
(
ERRORENUM
.
手机号码重复
);
let
filesList
=
[
"eId"
,
"enterpriseName"
,
"uscc"
,
"logonTime"
,
"state"
];
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业基础信息表
,
{
eId
},
filesList
);
if
(
!
resInfo
||
!
resInfo
.
eId
)
{
...
...
@@ -106,6 +113,14 @@ export async function settleInEnterpriseUpdate(eId:string, param) {
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
租赁信息
,
leaseInfo
,
{
eId
});
let
addUInfo
=
{
phone
:
param
.
phone
,
pwd
:
param
.
pwd
,
userName
:
param
.
userName
};
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业用户表
,
addUInfo
,
{
eId
,
uId
:
param
.
uId
});
return
{
isSuccess
:
true
};
}
...
...
src/biz/zhengCe.ts
View file @
199d205f
...
...
@@ -26,7 +26,7 @@ export async function enterprisePolicyList(keywords:string, page:number) {
title
:
info
.
title
,
source
:
info
.
source
,
createTimeMs
:
info
.
createTimeMs
,
closeTimeMs
:
info
.
closeTimeMs
,
closeTimeMs
:
info
.
closeTimeMs
?
info
.
closeTimeMs
:
"-"
,
isPermanent
:
info
.
isPermanent
});
});
...
...
@@ -73,7 +73,7 @@ export async function enterprisePolicyAdd( param) {
const
FuncName
=
"添加政策表"
eccFormParam
(
FuncName
,
PolicyUpdateConfig
,
param
);
param
.
closeTimeMs
=
getMySqlMs
(
param
.
closeTimeMs
);
if
(
param
.
closeTimeMs
)
param
.
closeTimeMs
=
getMySqlMs
(
param
.
closeTimeMs
);
param
.
createTimeMs
=
getMySqlMs
();
if
(
!
param
.
coverImg
)
param
.
coverImg
=
'[]'
;
else
param
.
coverImg
=
JSON
.
stringify
(
param
.
coverImg
);
...
...
src/config/eccParam/enterprise.ts
View file @
199d205f
...
...
@@ -43,6 +43,10 @@ export const SettleInForUpdateConfig = {
unitPrice
:{
type
:
"Number"
},
//单价
roomNumber
:{
type
:
"String"
},
//室号
rent
:{
type
:
"Number"
},
//总价
pwd
:{
type
:
"String"
},
phone
:{
type
:
"String"
},
userName
:{
type
:
"String"
},
uId
:{
type
:
"String"
}
}
export
const
RegisterUpdateConfig
=
{
...
...
@@ -73,6 +77,9 @@ export const AdminRegisterAddConfig = {
unitPrice
:{
type
:
"Number"
},
//单价
roomNumber
:{
type
:
"String"
},
//室号
rent
:{
type
:
"Number"
},
//总价
pwd
:{
type
:
"String"
},
phone
:{
type
:
"String"
},
userName
:{
type
:
"String"
}
}
...
...
src/config/enum/errorEnum.ts
View file @
199d205f
...
...
@@ -29,7 +29,9 @@ export enum ERRORENUM {
请先申请入孵
,
验证码错误
,
企业已存在
,
已审核请前往小程序登录
已审核请前往小程序登录
,
用户已存在
,
手机号码重复
}
export
enum
ERRORCODEENUM
{
...
...
src/routers/admin.ts
View file @
199d205f
...
...
@@ -92,32 +92,32 @@ export function setRouter(httpServer) {
async
function
iprList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
ente
r
priseName
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
iprList
(
ente
r
priseName
,
page
);
let
{
entepriseName
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
iprList
(
entepriseName
,
page
);
res
.
success
(
result
);
}
async
function
qualificationList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
ente
r
priseName
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
qiyeRenZheng
(
ente
r
priseName
,
page
);
let
{
entepriseName
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
qiyeRenZheng
(
entepriseName
,
page
);
res
.
success
(
result
);
}
async
function
enterpriseHonor
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
ente
r
priseName
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
enterpriseHonor
(
ente
r
priseName
,
page
);
let
{
entepriseName
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
enterpriseHonor
(
entepriseName
,
page
);
res
.
success
(
result
);
}
async
function
serviceList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
ente
r
priseName
,
followUpStatus
,
page
}
=
req
.
body
let
result
=
await
fuWuBiz
.
enterpriseService
(
ente
r
priseName
,
followUpStatus
,
page
);
let
{
entepriseName
,
followUpStatus
,
page
}
=
req
.
body
let
result
=
await
fuWuBiz
.
enterpriseService
(
entepriseName
,
followUpStatus
,
page
);
res
.
success
(
result
);
}
...
...
@@ -144,7 +144,7 @@ async function serviceEnd(req, res) {
*/
async
function
allList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
result
=
await
enterpriseInfoBiz
.
allEntepriseNameList
();
let
result
=
await
enterpriseInfoBiz
.
allEnte
r
priseNameList
();
res
.
success
(
result
);
}
...
...
@@ -286,8 +286,8 @@ async function policyDel(req, res) {
*/
async
function
talentList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
n
ame
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
enterpriseTalentList
(
n
ame
,
page
);
let
{
entepriseN
ame
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
enterpriseTalentList
(
entepriseN
ame
,
page
);
res
.
success
(
result
);
}
...
...
@@ -396,8 +396,8 @@ async function dwEnterpriseList(req, res) {
*/
async
function
manageList
(
req
,
res
)
{
const
UserInfo
=
req
.
userInfo
;
let
{
entepriseName
,
year
,
page
,
state
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
enterpriseManageList
(
entepriseName
,
year
,
page
,
state
);
let
{
entepriseName
,
year
,
page
}
=
req
.
body
let
result
=
await
enterpriseInfoBiz
.
enterpriseManageList
(
entepriseName
,
year
,
page
);
res
.
success
(
result
);
}
...
...
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