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
de09a114
Commit
de09a114
authored
May 12, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3.0
parent
edfdd05f
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
679 additions
and
20 deletions
+679
-20
enterprise.ts
src/biz/admin/enterprise/enterprise.ts
+158
-1
financing.ts
src/biz/admin/enterprise/financing.ts
+81
-0
dataDeclaration.ts
src/biz/mobileEnterprise/dataDeclaration.ts
+6
-2
enterprise.ts
src/biz/mobileEnterprise/enterprise.ts
+67
-11
financing.ts
src/biz/mobileEnterprise/financing.ts
+7
-0
eccFormParamConfig.ts
src/config/eccFormParamConfig.ts
+1
-0
enum.ts
src/config/enum.ts
+1
-1
splitResultConfig.ts
src/config/splitResultConfig.ts
+68
-0
businessdata.ts
src/data/enterprise/businessdata.ts
+20
-2
enterprise.ts
src/data/enterprise/enterprise.ts
+3
-2
financingInfo.ts
src/data/enterprise/financingInfo.ts
+9
-0
information.ts
src/data/enterprise/information.ts
+55
-0
initialTeam.ts
src/data/enterprise/initialTeam.ts
+74
-0
enterprise.ts
src/routers/admin/enterprise.ts
+107
-0
base.ts
src/routers/enterpriseMobileClient/base.ts
+9
-0
provide.ts
src/routers/provide.ts
+1
-1
system.ts
src/tools/system.ts
+12
-0
verificationParam.ts
src/util/verificationParam.ts
+0
-0
No files found.
src/biz/admin/enterprise/enterprise.ts
View file @
de09a114
...
@@ -3,13 +3,15 @@
...
@@ -3,13 +3,15 @@
* 作者:lxm
* 作者:lxm
*/
*/
import
{
extractData
}
from
"../../../util/piecemeal"
;
import
{
checkChange
,
extractData
}
from
"../../../util/piecemeal"
;
import
*
as
enterpriseData
from
"../../../data/enterprise/enterprise"
;
import
*
as
enterpriseData
from
"../../../data/enterprise/enterprise"
;
import
*
as
splitResultConfig
from
"../../../config/splitResultConfig"
;
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"
);
import
moment
=
require
(
"moment"
);
import
{
findBusinessDataByParams
,
findBusinessDataByParamsToPage
}
from
"../../../data/enterprise/businessdata"
;
import
{
findEnterpriseInitialTeamsByParam
,
findEnterpriseInitialTeamsByParamToPage
}
from
"../../../data/enterprise/initialTeam"
;
/**
/**
...
@@ -308,3 +310,157 @@ export async function outPutEnterpriseMoveOutList(name:string, fuHuaQiUscc:strin
...
@@ -308,3 +310,157 @@ export async function outPutEnterpriseMoveOutList(name:string, fuHuaQiUscc:strin
return
{
fileName
,
dataList
};
return
{
fileName
,
dataList
};
}
}
/**
* 获取企业经营数据列表
* @param name 企业名称
* @param year 年份
* @param quarters 季度
* @param page 页面
*/
export
async
function
getBusinessDataList
(
name
:
string
,
year
:
number
,
quarters
:
number
,
page
:
number
)
{
let
selectParam
:
any
=
{};
if
(
name
)
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
if
(
year
)
{
selectParam
.
year
=
year
;
if
(
quarters
)
selectParam
.
quarters
=
quarters
;
}
let
dataBaseList
=
await
findBusinessDataByParamsToPage
(
selectParam
,
(
page
-
1
)
*
10
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
=
extractData
(
splitResultConfig
.
EnterpriseBusinessDataConfig
,
info
,
true
);
dataList
.
push
(
changeData
);
});
return
{
dataList
};
}
/**
* 导出企业经营数据列表
* @param name 企业名称
* @param year 年份
* @param quarters 季度
*/
export
async
function
outPutBusinessDataList
(
name
:
string
,
year
:
number
,
quarters
:
number
,
type
:
number
)
{
let
fileName
=
"全部"
;
/**拼接查询条件 */
let
selectParam
:
any
=
{
state
:
configEnum
.
FUHUASTATE
.
迁出
};
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
if
(
name
)
{
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
}
if
(
year
)
{
selectParam
.
year
=
year
;
if
(
quarters
)
selectParam
.
quarters
=
quarters
;
}
fileName
=
"当前数据"
;
}
let
dataBaseList
=
await
findBusinessDataByParams
(
selectParam
);
let
keyList
=
[
"name"
,
"year"
,
"quarters"
,
"BI"
,
"RD"
,
"TXP"
];
let
titleList
=
[
"企业名称"
,
" 季度"
,
" 年度"
,
" 营业收入"
,
" 研发投入"
,
" 纳税"
];
let
dataList
=
[
titleList
];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
=
extractData
(
splitResultConfig
.
EnterpriseBusinessDataConfig
,
info
,
true
);
let
subList
=
[];
for
(
let
i
=
0
;
i
<
keyList
.
length
;
i
++
)
{
let
value
=
changeData
[
keyList
[
i
]]
subList
.
push
(
value
);
}
dataList
.
push
(
subList
);
});
return
{
dataList
,
fileName
};
}
/**
* 创始团队列表
* @param name 企业名称
* @param member 成员名称
* @param type 人才类型
* @param page 页面
*/
export
async
function
getInitialTeamList
(
name
:
string
,
member
:
string
,
type
:
number
,
page
:
number
)
{
let
selectParam
:
any
=
{};
if
(
name
)
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
if
(
member
)
selectParam
.
memberName
=
member
;
if
(
type
)
{
verificationEnumTools
.
eccEnumValue
(
"企业创始团队列表"
,
"type"
,
configEnum
.
ENTERPRISETEAM
,
type
);
selectParam
.
type
=
type
;
}
let
dataBaseList
=
await
findEnterpriseInitialTeamsByParamToPage
(
selectParam
,
(
page
-
1
)
*
10
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
:
any
=
extractData
(
splitResultConfig
.
EnterpriseInitialTeamDataListConfig
,
info
,
true
);
changeData
.
memberDEGREE
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
DEGREE
,
changeData
.
memberDEGREE
);
changeData
.
type
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
ENTERPRISETEAM
,
changeData
.
type
);
changeData
.
memberSex
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
SEX
,
changeData
.
memberSex
);
dataList
.
push
(
changeData
);
});
return
{
dataList
};
}
/**
* 导出企业创始团队列表
* @param name
* @param member
* @param memberType
* @param type
* @returns
*/
export
async
function
outPutInitialTeamList
(
name
:
string
,
member
:
string
,
memberType
:
number
,
type
:
number
)
{
let
fileName
=
"全部"
;
/**拼接查询条件 */
let
selectParam
:
any
=
{};
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
if
(
name
)
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
if
(
member
)
selectParam
.
memberName
=
member
;
if
(
memberType
){
verificationEnumTools
.
eccEnumValue
(
"导出企业创始团队列表"
,
"memberType"
,
configEnum
.
ENTERPRISETEAM
,
memberType
);
selectParam
.
type
=
memberType
;
}
fileName
=
"当前数据"
;
}
let
dataBaseList
=
await
findEnterpriseInitialTeamsByParam
(
selectParam
);
let
keyList
=
[
"name"
,
"type"
,
"memberName"
,
"memberSex"
,
"memberAge"
,
"memberDEGREE"
,
"memberSchool"
,
"des"
];
let
titleList
=
[
"企业名称"
,
"创始团队人才类型"
,
"成员姓名"
,
"成员性别"
,
"成员出生年月"
,
"成员最高学历"
,
"毕业学校"
,
"履历描述"
];
let
dataList
=
[
titleList
];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
:
any
=
extractData
(
splitResultConfig
.
EnterpriseInitialTeamDataListConfig
,
info
,
true
);
/**将枚举值转为字符 */
changeData
.
type
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
ENTERPRISETEAM
,
changeData
.
type
);
changeData
.
memberDEGREE
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
DEGREE
,
changeData
.
memberDEGREE
);
changeData
.
memberSex
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
SEX
,
changeData
.
memberSex
);
let
subList
=
[];
for
(
let
i
=
0
;
i
<
keyList
.
length
;
i
++
)
{
let
value
=
changeData
[
keyList
[
i
]]
subList
.
push
(
value
);
}
dataList
.
push
(
subList
);
});
return
{
dataList
,
fileName
};
//todo
}
\ No newline at end of file
src/biz/admin/enterprise/financing.ts
View file @
de09a114
...
@@ -12,6 +12,7 @@ import moment = require("moment");
...
@@ -12,6 +12,7 @@ import moment = require("moment");
import
*
as
configEnum
from
"../../../config/enum"
;
import
*
as
configEnum
from
"../../../config/enum"
;
import
{
changeEnumValue
}
from
"../../../util/verificationEnum"
;
import
{
changeEnumValue
}
from
"../../../util/verificationEnum"
;
import
{
extractData
}
from
"../../../util/piecemeal"
;
import
{
extractData
}
from
"../../../util/piecemeal"
;
import
{
selectFinancingListByParams
,
selectFinancingListByParamsToPage
}
from
"../../../data/enterprise/financingInfo"
;
/**
/**
...
@@ -128,3 +129,82 @@ export async function outPutFinancingList(monthData:string, fuHuaQiName:string,
...
@@ -128,3 +129,82 @@ export async function outPutFinancingList(monthData:string, fuHuaQiName:string,
return
result
;
return
result
;
}
}
/**
* 获取 企业填报的融资数据
* @param name 企业名称
* @param financingRounds 融资轮次
* @param fuHuaQiInvestment 孵化器是否参与投资
* @param page 页面
*/
export
async
function
getEnterpriseFinancing
(
name
:
string
,
financingRounds
:
number
,
fuHuaQiInvestment
:
number
,
page
:
number
)
{
let
selectParam
:
any
=
{};
if
(
name
)
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
if
(
financingRounds
)
selectParam
.
financingRounds
=
financingRounds
;
if
(
fuHuaQiInvestment
==
2
||
fuHuaQiInvestment
==
3
)
{
selectParam
.
fuHuaQiInvestment
=
fuHuaQiInvestment
==
2
?
true
:
false
;
}
let
dataBaseList
=
await
selectFinancingListByParamsToPage
(
selectParam
,
page
);
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
:
any
=
extractData
(
splitResultConfig
.
EnterpriseFinancingDataConfig
,
info
,
true
);
changeData
.
financingRounds
=
changeEnumValue
(
configEnum
.
FINANCINGROUNDS
,
changeData
.
financingRounds
);
changeData
.
fuHuaQiInvestment
=
changeData
.
fuHuaQiInvestment
?
"是"
:
"否"
;
changeData
.
fuHuaQiInvestmentStyle
=
changeEnumValue
(
configEnum
.
FUHUAQILNVESTMENTSTYLE
,
changeData
.
fuHuaQiInvestmentStyle
);
dataList
.
push
(
changeData
);
});
return
{
dataList
};
}
/**
* 导出 企业填报的融资数据
* @param name
* @param financingRounds
* @param fuHuaQiInvestment
* @param type
*/
export
async
function
outPutEnterpriseFinancing
(
name
:
string
,
financingRounds
:
number
,
fuHuaQiInvestment
:
number
,
type
:
number
)
{
let
selectParam
:
any
=
{};
let
fileName
=
"全部"
;
if
(
type
==
configEnum
.
OUTPUTTYPE
.
当前数据
)
{
/**如果选择当前数据 则拼接查询条件 */
if
(
name
)
selectParam
.
name
=
{
"$regex"
:
`
${
name
}
`
};
if
(
financingRounds
)
selectParam
.
financingRounds
=
financingRounds
;
if
(
fuHuaQiInvestment
==
2
||
fuHuaQiInvestment
==
3
)
{
selectParam
.
fuHuaQiInvestment
=
fuHuaQiInvestment
==
2
?
true
:
false
;
}
fileName
=
"当前数据"
;
}
let
dataBaseList
=
await
selectFinancingListByParams
(
selectParam
);
let
keyList
=
[
"name"
,
"financingRounds"
,
"financingAmount"
,
"investmentInstitutionsName"
,
"timeToObtainInvestment"
,
"fuHuaQiInvestment"
,
"fuHuaQiInvestmentAmount"
,
"fuHuaQiInvestmentStyle"
];
let
titleList
=
[
"企业名称"
,
"融资轮次"
,
"融资金额(万元)"
,
"投资机构名称"
,
"获得投资时间"
,
"孵化器是否投资"
,
"孵化器投资金额(万元)"
,
"孵化器投资方式"
];
let
dataList
=
[
titleList
];
dataBaseList
.
forEach
(
info
=>
{
let
changeData
:
any
=
extractData
(
splitResultConfig
.
EnterpriseFinancingDataConfig
,
info
,
true
);
changeData
.
fuHuaQiInvestment
=
changeData
.
fuHuaQiInvestment
?
"是"
:
"否"
;
let
subList
=
[];
for
(
let
i
=
0
;
i
<
keyList
.
length
;
i
++
)
{
let
value
=
changeData
[
keyList
[
i
]]
subList
.
push
(
value
);
}
dataList
.
push
(
subList
);
});
return
{
dataList
,
fileName
};
}
\ No newline at end of file
src/biz/mobileEnterprise/dataDeclaration.ts
View file @
de09a114
...
@@ -14,9 +14,10 @@ import { ENTERPRISEDECLARATIONTYPE } from "../../config/enum";
...
@@ -14,9 +14,10 @@ import { ENTERPRISEDECLARATIONTYPE } from "../../config/enum";
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
eccFormParam
}
from
"../../util/verificationParam"
;
import
{
eccFormParam
}
from
"../../util/verificationParam"
;
import
{
EnterpriseAdd
BusinessDataConfig
,
EnterpriseAdd
TeamDataConfig
}
from
"../../config/eccFormParamConfig"
;
import
{
EnterpriseAddTeamDataConfig
}
from
"../../config/eccFormParamConfig"
;
import
{
EnterpriseTeamConfig
}
from
"../../config/splitResultConfig"
;
import
{
EnterpriseTeamConfig
}
from
"../../config/splitResultConfig"
;
import
{
checkChange
,
extractData
}
from
"../../util/piecemeal"
;
import
{
checkChange
,
extractData
}
from
"../../util/piecemeal"
;
import
{
findEnterpriseByUscc
}
from
"../../data/enterprise/enterprise"
;
/** ----------------------------------------------------- 通用方法 start -------------------------------------- */
/** ----------------------------------------------------- 通用方法 start -------------------------------------- */
...
@@ -156,10 +157,13 @@ export async function addBusinessData(uscc:string, BI:number, RD:number, TXP:num
...
@@ -156,10 +157,13 @@ export async function addBusinessData(uscc:string, BI:number, RD:number, TXP:num
let
{
declarationQuarter
,
declarationYear
}
=
getDeclarationTime
();
let
{
declarationQuarter
,
declarationYear
}
=
getDeclarationTime
();
let
enterpriseInfo
=
await
findEnterpriseByUscc
(
uscc
);
let
businessDataInfo
=
await
findBusinessDataByTimeAndUscc
(
uscc
,
declarationYear
,
declarationQuarter
);
let
businessDataInfo
=
await
findBusinessDataByTimeAndUscc
(
uscc
,
declarationYear
,
declarationQuarter
);
if
(
businessDataInfo
&&
businessDataInfo
.
year
)
throw
new
BizError
(
ERRORENUM
.
请勿重复提交填报数据
,
`
${
uscc
}
重复的提交了经营数据`
);
if
(
businessDataInfo
&&
businessDataInfo
.
year
)
throw
new
BizError
(
ERRORENUM
.
请勿重复提交填报数据
,
`
${
uscc
}
重复的提交了经营数据`
);
await
createBusinessData
(
uscc
,
declarationYear
,
declarationQuarter
,
BI
,
RD
,
TXP
);
await
createBusinessData
(
uscc
,
declarationYear
,
declarationQuarter
,
BI
,
RD
,
TXP
,
enterpriseInfo
.
name
);
return
{
isSuccess
:
true
};
return
{
isSuccess
:
true
};
}
}
...
...
src/biz/mobileEnterprise/enterprise.ts
View file @
de09a114
...
@@ -6,10 +6,12 @@
...
@@ -6,10 +6,12 @@
import
{
EnterpriseQualificationUpdateConfig
,
EnterpriseUpdateBaseDataConfig
,
InitialTeamUpdateConfig
}
from
"../../config/eccFormParamConfig"
;
import
{
EnterpriseQualificationUpdateConfig
,
EnterpriseUpdateBaseDataConfig
,
InitialTeamUpdateConfig
}
from
"../../config/eccFormParamConfig"
;
import
{
ENTERPRISETEAM
,
INDUSTRY
,
LISTINGSITUATION
}
from
"../../config/enum"
;
import
{
ENTERPRISETEAM
,
INDUSTRY
,
LISTINGSITUATION
}
from
"../../config/enum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
EnterpriseBaseConfig
}
from
"../../config/splitResultConfig"
;
import
{
EnterpriseBaseConfig
,
EnterpriseInitialTeamConfig
}
from
"../../config/splitResultConfig"
;
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
{
selectFinancingInfo
}
from
"../../data/enterprise/financingInfo"
;
import
{
selectFinancingInfo
}
from
"../../data/enterprise/financingInfo"
;
import
{
addMoneyEnterpriseInitialTeam
,
deleteMoneyEnterpriseInitialTeam
,
findEnterpriseInitialTeam
,
updateMoneyEnterpriseInitialTeam
}
from
"../../data/enterprise/initialTeam"
;
import
{
findEnterpriseNewTeamData
}
from
"../../data/enterprise/team"
;
import
{
findEnterpriseNewTeamData
}
from
"../../data/enterprise/team"
;
import
{
getInitialTeamMemberId
}
from
"../../tools/system"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
checkChange
,
checkDataHaveNull
,
extractData
}
from
"../../util/piecemeal"
;
import
{
checkChange
,
checkDataHaveNull
,
extractData
}
from
"../../util/piecemeal"
;
import
{
eccEnumValue
}
from
"../../util/verificationEnum"
;
import
{
eccEnumValue
}
from
"../../util/verificationEnum"
;
...
@@ -35,11 +37,12 @@ function paramIsNull(param) {
...
@@ -35,11 +37,12 @@ function paramIsNull(param) {
/**
/**
* 获取首页基础信(首页顶端数据)
* 获取首页基础信(首页顶端数据)
* 知识产权,融资情况,企业资质 第一次进来会红,点开之后红点提示 会永久消失 2023-05-08
* @param uscc 企业统一信用代码
* @param uscc 企业统一信用代码
* @returns
* @returns
*/
*/
export
async
function
getHomePageHeaderData
(
uscc
:
string
)
{
export
async
function
getHomePageHeaderData
(
uscc
:
string
)
{
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
let
enterpriseInfo
=
await
enterpriseData
.
selectOneEnterpriseByParam
({
uscc
}
);
//企业名称
//企业名称
let
name
=
enterpriseInfo
.
name
;
let
name
=
enterpriseInfo
.
name
;
...
@@ -51,11 +54,10 @@ export async function getHomePageHeaderData(uscc:string) {
...
@@ -51,11 +54,10 @@ export async function getHomePageHeaderData(uscc:string) {
let
memberCount
=
teamInfo
.
doctor
+
teamInfo
.
master
+
teamInfo
.
undergraduate
+
teamInfo
.
juniorCollege
+
teamInfo
.
other
;
let
memberCount
=
teamInfo
.
doctor
+
teamInfo
.
master
+
teamInfo
.
undergraduate
+
teamInfo
.
juniorCollege
+
teamInfo
.
other
;
let
initialTeam
=
enterpriseInfo
.
initialTeam
.
length
==
0
;
//创始团队缺失 true=缺失
let
initialTeam
=
enterpriseInfo
.
initialTeam
.
length
==
0
;
//创始团队缺失 true=缺失
let
qualification
=
checkDataHaveNull
(
enterpriseInfo
.
qualification
,
false
);
//企业资质缺失 true=缺失 需要标红
let
intellectualProperty
=
checkDataHaveNull
(
enterpriseInfo
.
intellectualProperty
,
false
);
//知识产权缺失 true=缺失 需要标红
let
financingInfo
=
await
selectFinancingInfo
(
uscc
);
//融资情况缺失 true=缺失 需要标红
let
qualification
=
!
enterpriseInfo
.
tipsQualification
;
//企业资质缺失 true=缺失 需要标红
let
financing
=
checkDataHaveNull
(
financingInfo
,
false
);
let
intellectualProperty
=
!
enterpriseInfo
.
tipsIntellectualProperty
;
//知识产权缺失 true=缺失 需要标红
let
financing
=
!
enterpriseInfo
.
tipsFinancingInfo
;
//融资情况缺失 true=缺失 需要标红
let
checkEnterpriseInfo
=
extractData
(
EnterpriseBaseConfig
,
enterpriseInfo
,
false
);
let
checkEnterpriseInfo
=
extractData
(
EnterpriseBaseConfig
,
enterpriseInfo
,
false
);
let
baseInfo
=
checkDataHaveNull
(
checkEnterpriseInfo
,
true
)
let
baseInfo
=
checkDataHaveNull
(
checkEnterpriseInfo
,
true
)
...
@@ -76,6 +78,7 @@ export async function getHomePageHeaderData(uscc:string) {
...
@@ -76,6 +78,7 @@ export async function getHomePageHeaderData(uscc:string) {
/**
/**
* 修改创始团队信息
* 修改创始团队信息
* 修改 删除 添加 为一个接口 根据数据情况与老数据情况做匹配
* @param uscc 企业统一信用代码
* @param uscc 企业统一信用代码
* @param firstClassTalent 是否拥有国际一流人才
* @param firstClassTalent 是否拥有国际一流人才
* @param teams 创始团队信息
* @param teams 创始团队信息
...
@@ -94,13 +97,51 @@ export async function updateInitialTeamInfo(uscc:string, firstClassTalent:boolea
...
@@ -94,13 +97,51 @@ export async function updateInitialTeamInfo(uscc:string, firstClassTalent:boolea
if
(
info
.
des
.
length
>
200
)
throw
new
BizError
(
ERRORENUM
.
字数超过
200
限制
,
`修改创始团队信息 下标:
${
index
}
`
);
if
(
info
.
des
.
length
>
200
)
throw
new
BizError
(
ERRORENUM
.
字数超过
200
限制
,
`修改创始团队信息 下标:
${
index
}
`
);
});
});
//是否拥有国际人才这个字段在 企业表中 需要单独做更改
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
/**赋值 */
enterpriseInfo
.
firstClassTalent
=
firstClassTalent
;
enterpriseInfo
.
firstClassTalent
=
firstClassTalent
;
enterpriseInfo
.
initialTeam
=
teams
;
await
enterpriseInfo
.
save
();
await
enterpriseInfo
.
save
();
let
enterpriseInitialTeamList
=
await
findEnterpriseInitialTeam
(
uscc
);
/**匹配数据操作逻辑 */
let
newTeamIdList
=
[];
//用于匹配新数据,老数据不在新数据中 判定为被删除
teams
.
forEach
(
info
=>
{
if
(
info
.
id
&&
info
.
id
!=
"newdata"
)
newTeamIdList
.
push
(
info
.
id
);
//todo
});
let
deleteList
=
[];
//老数据将出现在这个map里 用于与新数据id匹配,匹配id不在老数据中判定为添加操作
let
dataBaseTeamMap
=
{};
enterpriseInitialTeamList
.
forEach
(
info
=>
{
dataBaseTeamMap
[
info
.
id
]
=
info
;
if
(
newTeamIdList
.
indexOf
(
info
.
id
)
==
-
1
)
{
deleteList
.
push
(
info
);
}
});
let
addList
=
[];
let
updateList
=
[];
teams
.
forEach
(
info
=>
{
let
{
id
}
=
info
;
let
dataBaseInfo
=
dataBaseTeamMap
[
id
];
if
(
!
dataBaseInfo
)
{
//不存在老的id 判定为添加操作
info
.
id
=
getInitialTeamMemberId
(
uscc
,
info
.
name
);
info
.
uscc
=
uscc
;
info
.
name
=
enterpriseInfo
.
name
;
addList
.
push
(
info
);
}
else
{
//比对新老数据判断数据需不需要修改
let
changeList
=
checkChange
(
info
,
Object
.
assign
({
name
:
enterpriseInfo
.
name
,
uscc
},
dataBaseInfo
));
if
(
changeList
.
length
)
updateList
.
push
(
info
);
}
});
/**修改数据 */
if
(
addList
.
length
)
await
addMoneyEnterpriseInitialTeam
(
addList
);
if
(
updateList
.
length
)
await
updateMoneyEnterpriseInitialTeam
(
updateList
);
if
(
deleteList
.
length
)
await
deleteMoneyEnterpriseInitialTeam
(
deleteList
);
return
{
isSuccess
:
true
};
return
{
isSuccess
:
true
};
}
}
...
@@ -113,10 +154,17 @@ export async function updateInitialTeamInfo(uscc:string, firstClassTalent:boolea
...
@@ -113,10 +154,17 @@ export async function updateInitialTeamInfo(uscc:string, firstClassTalent:boolea
*/
*/
export
async
function
selectInitialTeamInfo
(
uscc
:
string
)
{
export
async
function
selectInitialTeamInfo
(
uscc
:
string
)
{
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
let
initialTeam
=
enterpriseInfo
.
initialTeam
||
[];
let
firstClassTalent
=
enterpriseInfo
.
firstClassTalent
;
let
firstClassTalent
=
enterpriseInfo
.
firstClassTalent
;
let
initialTeamList
=
await
findEnterpriseInitialTeam
(
uscc
);
let
initialTeam
=
[];
initialTeamList
.
forEach
(
info
=>
{
let
changeData
=
extractData
(
EnterpriseInitialTeamConfig
,
info
,
false
);
initialTeam
.
push
(
changeData
);
});
return
{
initialTeam
,
firstClassTalent
};
return
{
initialTeam
,
firstClassTalent
};
}
}
...
@@ -134,6 +182,10 @@ export async function updateIntellectualProperty(uscc:string, alienPatent:number
...
@@ -134,6 +182,10 @@ export async function updateIntellectualProperty(uscc:string, alienPatent:number
enterpriseInfo
.
intellectualProperty
=
{
alienPatent
,
classIPatent
,
secondClassPatent
};
enterpriseInfo
.
intellectualProperty
=
{
alienPatent
,
classIPatent
,
secondClassPatent
};
if
(
!
enterpriseInfo
.
tipsIntellectualProperty
)
{
enterpriseInfo
.
tipsIntellectualProperty
=
true
;
}
await
enterpriseInfo
.
save
();
await
enterpriseInfo
.
save
();
return
{
isSuccess
:
true
}
return
{
isSuccess
:
true
}
...
@@ -201,6 +253,10 @@ export async function updateQualification(uscc:string, param) {
...
@@ -201,6 +253,10 @@ export async function updateQualification(uscc:string, param) {
enterpriseInfo
.
qualification
=
JSON
.
parse
(
JSON
.
stringify
(
param
)
);
enterpriseInfo
.
qualification
=
JSON
.
parse
(
JSON
.
stringify
(
param
)
);
if
(
!
enterpriseInfo
.
tipsQualification
)
{
enterpriseInfo
.
tipsQualification
=
true
;
}
await
enterpriseInfo
.
save
();
await
enterpriseInfo
.
save
();
return
{
isSuccess
:
true
};
return
{
isSuccess
:
true
};
...
...
src/biz/mobileEnterprise/financing.ts
View file @
de09a114
...
@@ -30,6 +30,13 @@ export async function getEnterpriseFinancingList(uscc:string) {
...
@@ -30,6 +30,13 @@ export async function getEnterpriseFinancingList(uscc:string) {
resultList
.
push
(
updateInfo
);
resultList
.
push
(
updateInfo
);
});
});
let
enterpriseInfo
=
await
findEnterpriseByUscc
(
uscc
);
if
(
!
enterpriseInfo
.
tipsFinancingInfo
)
{
enterpriseInfo
.
tipsFinancingInfo
=
true
;
await
enterpriseInfo
.
save
();
}
return
{
dataList
:
resultList
};
return
{
dataList
:
resultList
};
}
}
...
...
src/config/eccFormParamConfig.ts
View file @
de09a114
...
@@ -377,6 +377,7 @@ export const EnterpriseAddTeamDataConfig = {
...
@@ -377,6 +377,7 @@ export const EnterpriseAddTeamDataConfig = {
* 备注: 所有参数为必填
* 备注: 所有参数为必填
*/
*/
export
const
InitialTeamUpdateConfig
=
{
export
const
InitialTeamUpdateConfig
=
{
id
:{
type
:
"String"
},
//标识
type
:{
type
:
"Number"
},
//创始团队人才类型
type
:{
type
:
"Number"
},
//创始团队人才类型
memberName
:{
type
:
"String"
},
//成员姓名
memberName
:{
type
:
"String"
},
//成员姓名
memberSex
:{
type
:
"Number"
},
//成员性别
memberSex
:{
type
:
"Number"
},
//成员性别
...
...
src/config/enum.ts
View file @
de09a114
...
@@ -31,7 +31,7 @@ export enum TEAM {
...
@@ -31,7 +31,7 @@ export enum TEAM {
/**
/**
*
孵化器创业
团队 【企业端用】
*
创始
团队 【企业端用】
*/
*/
export
enum
ENTERPRISETEAM
{
export
enum
ENTERPRISETEAM
{
国际一流人才
=
2
,
国际一流人才
=
2
,
...
...
src/config/splitResultConfig.ts
View file @
de09a114
...
@@ -332,6 +332,23 @@ export const EnterpriseBaseConfig = {
...
@@ -332,6 +332,23 @@ export const EnterpriseBaseConfig = {
/**
/**
* 使用端: 小程序端【企业入口】
* 使用端: 小程序端【企业入口】
* 场景: 创始团队回显
* 备注:
*/
export
const
EnterpriseInitialTeamConfig
=
{
id
:{
key
:
"id标识"
},
type
:{
key
:
"创始团队人才类型"
},
memberName
:{
key
:
"成员姓名"
},
memberSex
:{
key
:
"成员性别"
},
memberAge
:{
key
:
"成员年龄 出生年月时间戳"
},
memberDEGREE
:{
key
:
"成员最高学历"
},
memberSchool
:{
key
:
"毕业学校"
},
des
:{
key
:
"履历描述"
},
}
/**
* 使用端: 小程序端【企业入口】
* 场景: 企业的团队信息申报回显
* 场景: 企业的团队信息申报回显
* 备注:
* 备注:
*/
*/
...
@@ -345,3 +362,54 @@ export const EnterpriseTeamConfig = {
...
@@ -345,3 +362,54 @@ export const EnterpriseTeamConfig = {
graduates
:{
key
:
"应届毕业生"
},
graduates
:{
key
:
"应届毕业生"
},
}
}
/**
* 使用端: 管理后台端
* 场景: 经营数据
* 备注:
*/
export
const
EnterpriseBusinessDataConfig
=
{
name
:{
key
:
"企业名称"
},
year
:{
key
:
"年份"
},
quarters
:{
key
:
"季度"
},
BI
:{
key
:
"营业收入"
},
RD
:{
key
:
"研发投入"
},
TXP
:{
key
:
"纳税"
},
}
/**
* 使用端: 管理后台端
* 场景: 企业填报融资数据
* 备注:
*/
export
const
EnterpriseFinancingDataConfig
=
{
name
:{
key
:
"企业名称"
},
financingRounds
:{
key
:
"融资轮次"
},
financingAmount
:{
key
:
"融资金额(万元)"
},
investmentInstitutionsName
:{
key
:
"投资机构名称"
},
timeToObtainInvestment
:{
key
:
"获得投资时间"
,
changeDate
:
true
},
fuHuaQiInvestment
:{
key
:
"孵化器是否投资"
},
fuHuaQiInvestmentAmount
:{
key
:
"孵化器投资金额(万元)"
},
fuHuaQiInvestmentStyle
:{
key
:
"孵化器投资方式"
}
}
/**
* 使用端: 管理后台端
* 场景: 创始团队列表
* 备注:
*/
export
const
EnterpriseInitialTeamDataListConfig
=
{
name
:{
key
:
"企业名称"
},
type
:{
key
:
"创始团队人才类型"
},
memberName
:{
key
:
"成员姓名"
},
memberSex
:{
key
:
"成员性别"
},
memberAge
:{
key
:
"成员年龄 出生年月时间戳"
,
changeDate
:
true
},
memberDEGREE
:{
key
:
"成员最高学历"
},
memberSchool
:{
key
:
"毕业学校"
},
des
:{
key
:
"履历描述"
},
}
src/data/enterprise/businessdata.ts
View file @
de09a114
...
@@ -9,12 +9,12 @@ const businessSchema = new Schema({
...
@@ -9,12 +9,12 @@ const businessSchema = new Schema({
year
:{
type
:
Number
,
index
:
true
},
//年度
year
:{
type
:
Number
,
index
:
true
},
//年度
quarters
:{
type
:
Number
,
index
:
true
},
//季度
quarters
:{
type
:
Number
,
index
:
true
},
//季度
uscc
:{
type
:
String
,
index
:
true
},
uscc
:{
type
:
String
,
index
:
true
},
name
:{
type
:
String
,
index
:
true
},
//企业名称
BI
:
Number
,
//营业收入
BI
:
Number
,
//营业收入
RD
:
Number
,
//研发投入
RD
:
Number
,
//研发投入
TXP
:
Number
,
//纳税
TXP
:
Number
,
//纳税
createTime
:
Number
,
//填写时间
createTime
:
Number
,
//填写时间
isSubmit
:{
type
:
Boolean
,
default
:
false
},
//是否提交
isSubmit
:{
type
:
Boolean
,
default
:
false
},
//是否提交
// isReplenish:{type:Boolean, default:false},//是否补充数据
});
});
var
businessDataModel
;
var
businessDataModel
;
...
@@ -59,7 +59,24 @@ export async function findNotSubmitBusinessDataByTimeAndUscc(uscc:string, year:n
...
@@ -59,7 +59,24 @@ export async function findNotSubmitBusinessDataByTimeAndUscc(uscc:string, year:n
export
async
function
createBusinessData
(
uscc
:
string
,
year
:
number
,
quarters
:
number
,
BI
:
number
,
RD
:
number
,
TXP
:
number
)
{
export
async
function
createBusinessData
(
uscc
:
string
,
year
:
number
,
quarters
:
number
,
BI
:
number
,
RD
:
number
,
TXP
:
number
,
name
:
string
)
{
let
addInfo
=
{
uscc
,
year
,
quarters
,
BI
,
RD
,
TXP
,
createTime
:
new
Date
().
valueOf
()
};
let
addInfo
=
{
uscc
,
year
,
quarters
,
BI
,
RD
,
TXP
,
createTime
:
new
Date
().
valueOf
()
};
await
businessDataModel
.
create
(
addInfo
);
await
businessDataModel
.
create
(
addInfo
);
}
}
/**
* 根据条件查询
* @param param 查询条件
*/
export
async
function
findBusinessDataByParamsToPage
(
param
,
skipNumber
)
{
return
await
businessDataModel
.
find
(
param
).
skip
(
skipNumber
).
limit
(
10
);
}
/**
* 根据条件查询
* @param param 查询条件
*/
export
async
function
findBusinessDataByParams
(
param
)
{
return
await
businessDataModel
.
find
(
param
);
}
\ No newline at end of file
src/data/enterprise/enterprise.ts
View file @
de09a114
...
@@ -20,8 +20,6 @@ const initialTeamSchema = new Schema({
...
@@ -20,8 +20,6 @@ const initialTeamSchema = new Schema({
des
:
String
,
//履历描述
des
:
String
,
//履历描述
},{
_id
:
false
});
},{
_id
:
false
});
/**企业资质 */
/**企业资质 */
const
qualificationSchema
=
new
Schema
({
const
qualificationSchema
=
new
Schema
({
isHighTech
:
Boolean
,
isHighTech
:
Boolean
,
...
@@ -86,6 +84,9 @@ const enterpriseSchema = new Schema({
...
@@ -86,6 +84,9 @@ const enterpriseSchema = new Schema({
qualification
:{
type
:
qualificationSchema
},
//企业资质
qualification
:{
type
:
qualificationSchema
},
//企业资质
intellectualProperty
:{
type
:
intellectualPropertySchema
},
//知识产权
intellectualProperty
:{
type
:
intellectualPropertySchema
},
//知识产权
firstClassTalent
:{
type
:
Boolean
,
default
:
false
},
//是否拥有国际一流人才 默认没有
firstClassTalent
:{
type
:
Boolean
,
default
:
false
},
//是否拥有国际一流人才 默认没有
tipsQualification
:{
type
:
Boolean
,
default
:
false
},
//标识-企业资质
tipsIntellectualProperty
:{
type
:
Boolean
,
default
:
false
},
//标识-知识产权
tipsFinancingInfo
:{
type
:
Boolean
,
default
:
false
},
//标识-企业融资
});
});
var
enterpriseModel
;
var
enterpriseModel
;
...
...
src/data/enterprise/financingInfo.ts
View file @
de09a114
...
@@ -70,3 +70,11 @@ export async function getFinancingById(id:string) {
...
@@ -70,3 +70,11 @@ export async function getFinancingById(id:string) {
export
async
function
deleteFinancingById
(
id
:
string
)
{
export
async
function
deleteFinancingById
(
id
:
string
)
{
return
await
financingInfoModel
.
deleteOne
({
id
});
return
await
financingInfoModel
.
deleteOne
({
id
});
}
}
export
async
function
selectFinancingListByParamsToPage
(
param
,
skipNumber
)
{
return
await
financingInfoModel
.
find
(
param
).
skip
(
skipNumber
).
limit
(
10
);
}
export
async
function
selectFinancingListByParams
(
param
)
{
return
await
financingInfoModel
.
find
(
param
);
}
\ No newline at end of file
src/data/enterprise/information.ts
0 → 100644
View file @
de09a114
/**
* 企业资讯
*
*/
import
{
Schema
}
from
'mongoose'
;
import
{
baseDB
}
from
'../../db/mongo/dbInit'
;
const
informationSchema
=
new
Schema
({
id
:{
type
:
String
,
index
:
true
},
//唯一标识
desc
:
String
,
//描述
createTimeMs
:
Number
,
//创建时间
imgs
:{
type
:[
String
],
default
:[]},
author
:
String
,
createUid
:
String
,
target
:{
type
:[
Number
],
default
:[]},
//标签
noAutomatic
:{
type
:
Boolean
,
default
:
false
},
//非自动状态 true=关闭,false=开启
});
var
informationModel
;
export
function
initModel
(){
informationModel
=
baseDB
.
model
(
'information'
,
informationSchema
);
informationModel
.
selectOnceData
=
async
function
(
paramater
:
object
)
{
let
selectInfo
=
await
informationModel
.
findOne
(
paramater
).
exec
();
if
(
selectInfo
)
{
if
(
!
selectInfo
.
runSave
)
{
selectInfo
.
runSave
=
selectInfo
.
save
;
selectInfo
.
save
=
save
.
bind
(
selectInfo
)
}
}
return
selectInfo
;
}
}
export
async
function
save
(
throwError
=
false
)
{
if
(
!
this
.
isModified
())
return
;
await
this
.
runSave
({
validateBeforeSave
:
false
}).
catch
(
err
=>
{
console
.
log
(
err
);
});
}
/**
* 创建资讯
* @param id
* @param desc
* @param createTimeMs
* @param author
* @param createUid
* @param target
*/
export
async
function
createInformation
(
id
:
string
,
desc
:
string
,
imgs
,
author
:
string
,
createUid
:
string
,
target
:
number
)
{
// let addInfo = {id, desc, createTimeMs, imgs, author, createUid, target, noAutomatic};
}
\ No newline at end of file
src/data/enterprise/initialTeam.ts
0 → 100644
View file @
de09a114
/**
* 企业创始团队
*/
import
{
Schema
}
from
'mongoose'
;
import
{
baseDB
}
from
'../../db/mongo/dbInit'
;
const
initialTeamSchema
=
new
Schema
({
id
:{
type
:
String
,
index
:
true
},
//id标识
uscc
:{
type
:
String
,
index
:
true
},
//企业uscc
name
:
String
,
//企业名称
type
:
Number
,
//创始团队人才类型
memberName
:
String
,
//成员姓名
memberSex
:
Number
,
//成员性别
memberAge
:
Number
,
//成员年龄 出生年月时间戳
memberDEGREE
:
Number
,
//成员最高学历
memberSchool
:
String
,
//毕业学校
des
:
String
,
//履历描述
},{
_id
:
false
});
var
initialTeamModel
;
export
function
initModel
(){
initialTeamModel
=
baseDB
.
model
(
'enterpriseInitialTeam'
,
initialTeamSchema
);
}
/**
* 添加团队成员
* @param uscc
* @param name
* @param teamList
*/
export
async
function
addEnterpriseInitialTeam
(
teamInfo
)
{
return
await
initialTeamModel
.
create
(
teamInfo
);
}
export
async
function
findEnterpriseInitialTeam
(
uscc
:
string
)
{
return
await
initialTeamModel
.
find
({
uscc
});
}
export
async
function
deleteEnterpriseInitialTeamMember
(
id
:
string
)
{
await
initialTeamModel
.
deleteOne
({
id
});
}
export
async
function
addMoneyEnterpriseInitialTeam
(
teams
)
{
await
initialTeamModel
.
create
(
teams
);
}
export
async
function
updateMoneyEnterpriseInitialTeam
(
updateTeams
)
{
for
(
let
i
=
0
;
i
<
updateTeams
.
length
;
i
++
)
{
let
info
=
updateTeams
[
i
];
let
id
=
info
.
id
;
delete
info
.
id
;
await
initialTeamModel
.
updateOnd
({
id
},
info
);
}
}
export
async
function
deleteMoneyEnterpriseInitialTeam
(
deleteTeams
)
{
for
(
let
i
=
0
;
i
<
deleteTeams
.
length
;
i
++
)
{
let
info
=
deleteTeams
[
i
];
let
id
=
info
.
id
;
await
initialTeamModel
.
deleteOne
({
id
});
}
}
export
async
function
findEnterpriseInitialTeamsByParamToPage
(
param
,
skipCount
:
number
)
{
return
await
initialTeamModel
.
find
(
param
).
skip
(
skipCount
).
limit
(
10
);
}
export
async
function
findEnterpriseInitialTeamsByParam
(
param
)
{
return
await
initialTeamModel
.
find
(
param
);
}
\ No newline at end of file
src/routers/admin/enterprise.ts
View file @
de09a114
...
@@ -22,6 +22,16 @@ export function setRouter(httpServer) {
...
@@ -22,6 +22,16 @@ export function setRouter(httpServer) {
/**迁出企业2.0新加 */
/**迁出企业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
));
/**经营数据3.0新加 */
httpServer
.
post
(
'/admin/enterprise/businessdatalist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
businessDataList
));
httpServer
.
post
(
'/admin/data/output/businessdatalist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutBusinessData
));
/**企业填报的融资数据3.0新加 */
httpServer
.
post
(
'/admin/enterprise/financinginfolist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
financingInfoList
));
httpServer
.
post
(
'/admin/data/output/financinginfolist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutFinancingInfoList
));
/**企业创始团队列表 */
httpServer
.
post
(
'/admin/enterprise/initialteam'
,
checkGuanWeiHuiToken
,
asyncHandler
(
initialTeamList
));
httpServer
.
post
(
'/admin/data/output/initialteam'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutEnterpriseInitialTeamList
));
}
}
...
@@ -138,3 +148,99 @@ async function outPutMoveOutList(req, res) {
...
@@ -138,3 +148,99 @@ async function outPutMoveOutList(req, res) {
res
.
success
({
data
:
dataList
,
name
:
`迁出企业
${
fileName
}
.xlsx`
});
res
.
success
({
data
:
dataList
,
name
:
`迁出企业
${
fileName
}
.xlsx`
});
}
}
/**
* 企业经营数据列表
* @param req
* @param res
*/
async
function
businessDataList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
year
:
'Number'
,
quarters
:
'Number'
,
page
:
'Number'
};
const
NotMustHaveKeys
=
[
"name"
,
"year"
,
"quarters"
];
let
{
name
,
year
,
quarters
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
restult
=
await
enterpriseAdminBiz
.
getBusinessDataList
(
name
,
year
,
quarters
,
page
);
res
.
success
(
restult
);
}
/**
* 导出企业经营数据列表
* @param req
* @param res
*/
async
function
outPutBusinessData
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
year
:
'Number'
,
quarters
:
'Number'
,
type
:
'Number'
};
const
NotMustHaveKeys
=
[
"name"
,
"year"
,
"quarters"
];
let
{
name
,
year
,
quarters
,
type
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
{
dataList
,
fileName
}
=
await
enterpriseAdminBiz
.
outPutBusinessDataList
(
name
,
year
,
quarters
,
type
);
res
.
success
({
data
:
dataList
,
name
:
`
${
fileName
}
企业经营.xlsx`
});
}
/**
* 企业填报的融资数据列表
* @param req
* @param res
*/
async
function
financingInfoList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
financingRounds
:
'Number'
,
fuHuaQiInvestment
:
'Number'
,
page
:
'Number'
};
const
NotMustHaveKeys
=
[
"name"
,
"financingRounds"
,
"fuHuaQiInvestment"
];
let
{
name
,
financingRounds
,
fuHuaQiInvestment
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
restult
=
await
financingAdminBiz
.
getEnterpriseFinancing
(
name
,
financingRounds
,
fuHuaQiInvestment
,
page
);
res
.
success
(
restult
);
}
/**
* 导出企业填报的融资数据列表
* @param req
* @param res
*/
async
function
outPutFinancingInfoList
(
req
,
res
)
{
let
reqConf
=
{
name
:
'String'
,
financingRounds
:
'Number'
,
fuHuaQiInvestment
:
'Number'
,
type
:
'Number'
};
const
NotMustHaveKeys
=
[
"name"
,
"financingRounds"
,
"fuHuaQiInvestment"
];
let
{
name
,
financingRounds
,
fuHuaQiInvestment
,
type
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
{
dataList
,
fileName
}
=
await
financingAdminBiz
.
outPutEnterpriseFinancing
(
name
,
financingRounds
,
fuHuaQiInvestment
,
type
);
res
.
success
({
data
:
dataList
,
name
:
`
${
fileName
}
企业填报融资数据.xlsx`
});
}
/**
* 企业创始团队列表
* @param req
* @param res
*/
async
function
initialTeamList
(
req
,
res
)
{
let
reqConf
=
{
name
:
"String"
,
member
:
"String"
,
type
:
"Number"
,
page
:
'Number'
};
const
NotMustHaveKeys
=
[
"name"
,
"member"
,
"type"
];
let
{
name
,
member
,
type
,
page
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
restult
=
await
enterpriseAdminBiz
.
getInitialTeamList
(
name
,
member
,
type
,
page
);
res
.
success
(
restult
);
}
/**
* 导出企业创始团队列表
* @param req
* @param res
*/
async
function
outPutEnterpriseInitialTeamList
(
req
,
res
)
{
let
reqConf
=
{
name
:
"String"
,
member
:
"String"
,
type
:
"Number"
,
memberType
:
'Number'
};
const
NotMustHaveKeys
=
[
"name"
,
"member"
,
"memberType"
];
let
{
name
,
member
,
type
,
memberType
}
=
eccReqParamater
(
reqConf
,
req
.
body
,
NotMustHaveKeys
);
let
{
dataList
,
fileName
}
=
await
enterpriseAdminBiz
.
outPutInitialTeamList
(
name
,
member
,
memberType
,
type
);
res
.
success
({
data
:
dataList
,
name
:
`
${
fileName
}
企业创始团队数据.xlsx`
});
}
\ No newline at end of file
src/routers/enterpriseMobileClient/base.ts
View file @
de09a114
...
@@ -23,6 +23,8 @@ export function setRouter(httpServer) {
...
@@ -23,6 +23,8 @@ export function setRouter(httpServer) {
/**企业资质 */
/**企业资质 */
httpServer
.
post
(
'/enterprise/qualification/update'
,
checkEnterpriseToken
,
asyncHandler
(
updateQualification
));
httpServer
.
post
(
'/enterprise/qualification/update'
,
checkEnterpriseToken
,
asyncHandler
(
updateQualification
));
httpServer
.
post
(
'/enterprise/qualification/info'
,
checkEnterpriseToken
,
asyncHandler
(
qualificationInfo
));
httpServer
.
post
(
'/enterprise/qualification/info'
,
checkEnterpriseToken
,
asyncHandler
(
qualificationInfo
));
/**资讯 */
httpServer
.
post
(
'/enterprise/information/list'
,
checkEnterpriseToken
,
asyncHandler
(
informationList
));
}
}
...
@@ -154,3 +156,9 @@ async function baseInfo(req, res) {
...
@@ -154,3 +156,9 @@ async function baseInfo(req, res) {
res
.
success
(
result
);
res
.
success
(
result
);
}
}
async
function
informationList
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
}
\ No newline at end of file
src/routers/provide.ts
View file @
de09a114
...
@@ -19,7 +19,7 @@ export function setRouter(httpServer) {
...
@@ -19,7 +19,7 @@ export function setRouter(httpServer) {
/**3.0 */
/**3.0 */
httpServer
.
post
(
'/admin/provide/enterprise/enterpriseinfo'
,
checkInterior
,
asyncHandler
(
enterpriseInfo
));
httpServer
.
post
(
'/admin/provide/enterprise/enterpriseinfo'
,
checkInterior
,
asyncHandler
(
enterpriseInfo
));
/**补录数据 */
/**补录数据
已完成
*/
httpServer
.
post
(
'/admin/provide/basedata/inputdata'
,
checkInterior
,
asyncHandler
(
inputData
));
httpServer
.
post
(
'/admin/provide/basedata/inputdata'
,
checkInterior
,
asyncHandler
(
inputData
));
httpServer
.
post
(
'/admin/provide/basedata/inputenterprise202304data'
,
checkInterior
,
asyncHandler
(
inputEnterprise202304Data
));
httpServer
.
post
(
'/admin/provide/basedata/inputenterprise202304data'
,
checkInterior
,
asyncHandler
(
inputEnterprise202304Data
));
...
...
src/tools/system.ts
View file @
de09a114
...
@@ -177,3 +177,14 @@ export function getSMSCode() {
...
@@ -177,3 +177,14 @@ export function getSMSCode() {
export
function
getFinancingId
(
uscc
)
{
export
function
getFinancingId
(
uscc
)
{
return
md5
(
`
${
uscc
}${
new
Date
().
valueOf
()}${
Math
.
ceil
(
Math
.
random
()
*
1000
)}
`
);
return
md5
(
`
${
uscc
}${
new
Date
().
valueOf
()}${
Math
.
ceil
(
Math
.
random
()
*
1000
)}
`
);
}
}
/**
* 获取创始团队成员id
* @param uscc
* @param name
* @returns
*/
export
function
getInitialTeamMemberId
(
uscc
:
string
,
name
:
string
)
{
return
md5
(
`
${
uscc
}${
name
}${
Math
.
ceil
(
Math
.
random
()
*
1000000
)}
`
);
}
\ No newline at end of file
src/util/verificationParam.ts
View file @
de09a114
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