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
23b1b9f7
Commit
23b1b9f7
authored
Aug 11, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修bug
parent
931bfbd0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
407 additions
and
177 deletions
+407
-177
enterprise.ts
src/biz/admin/enterprise/enterprise.ts
+0
-0
financing.ts
src/biz/admin/enterprise/financing.ts
+2
-2
fuHuaQi.ts
src/biz/admin/fuHuaQi/fuHuaQi.ts
+15
-9
month.ts
src/biz/admin/fuHuaQi/month.ts
+11
-5
provide.ts
src/biz/admin/provide.ts
+14
-0
baseData.ts
src/biz/admin/stats/fuHuaQi/baseData.ts
+9
-7
operate.ts
src/biz/admin/stats/fuHuaQi/operate.ts
+54
-38
valueAnalysis.ts
src/biz/admin/stats/fuHuaQi/valueAnalysis.ts
+69
-30
enterpriseBase.ts
src/biz/admin/stats/guanWeiHui/enterpriseBase.ts
+7
-6
fuHuaQiWarning.ts
src/biz/admin/stats/guanWeiHui/fuHuaQiWarning.ts
+6
-5
fuhuaqiBase.ts
src/biz/admin/stats/guanWeiHui/fuhuaqiBase.ts
+4
-5
user.ts
src/biz/mobileEnterprise/user.ts
+74
-24
myEnterprise.ts
src/biz/mobileFuHuaQi/enterprise/myEnterprise.ts
+29
-24
user.ts
src/biz/mobileFuHuaQi/fuHuaQi/user.ts
+13
-0
point.ts
src/biz/point.ts
+3
-2
errorEnum.ts
src/config/errorEnum.ts
+2
-1
splitResultConfig.ts
src/config/splitResultConfig.ts
+9
-4
enterprise.ts
src/data/enterprise/enterprise.ts
+3
-3
financingInfo.ts
src/data/enterprise/financingInfo.ts
+2
-1
team.ts
src/data/enterprise/quarterTask/team.ts
+3
-3
financing.ts
src/data/fuHuaQi/monthTask/financing.ts
+3
-4
task.ts
src/data/fuHuaQi/monthTask/task.ts
+1
-1
user.ts
src/routers/enterpriseMobileClient/user.ts
+49
-0
user.ts
src/routers/mobileClient/user.ts
+15
-1
provide.ts
src/routers/provide.ts
+9
-0
system.ts
src/tools/system.ts
+1
-2
No files found.
src/biz/admin/enterprise/enterprise.ts
View file @
23b1b9f7
This diff is collapsed.
Click to expand it.
src/biz/admin/enterprise/financing.ts
View file @
23b1b9f7
...
...
@@ -55,7 +55,7 @@ export async function financingList(monthData:string, fuHuaQiName:string, indust
/** 字段的特化处理 */
changeData
.
fuhuaqiUscc
=
usccMap
[
info
.
fuHuaQiUscc
]
||
""
;
changeData
.
industry
=
changeEnumValue
(
configEnum
.
INDUSTRY
,
info
.
industry
);
changeData
.
industry
=
changeEnumValue
(
configEnum
.
INDUSTRY
,
info
.
industry
)
||
"-"
;
changeData
.
financingRounds
=
changeEnumValue
(
configEnum
.
FINANCINGROUNDS
,
info
.
financingRounds
);
changeData
.
fuHuaQiInvestmentStyle
=
changeEnumValue
(
configEnum
.
FUHUAQILNVESTMENTSTYLE
,
info
.
fuHuaQiInvestmentStyle
);
dataList
.
push
(
changeData
);
...
...
@@ -115,7 +115,7 @@ export async function outPutFinancingList(monthData:string, fuHuaQiName:string,
/**截取返回字段 */
let
changeData
:
any
=
extractData
(
splitResultConfig
.
FinancingListConfig
,
info
,
true
);
changeData
.
fuhuaqiUscc
=
usccMap
[
info
.
fuHuaQiUscc
]
||
""
;
changeData
.
industry
=
changeEnumValue
(
configEnum
.
INDUSTRY
,
info
.
industry
);
changeData
.
industry
=
changeEnumValue
(
configEnum
.
INDUSTRY
,
info
.
industry
)
||
"-"
;
changeData
.
financingRounds
=
changeEnumValue
(
configEnum
.
FINANCINGROUNDS
,
info
.
financingRounds
);
changeData
.
fuHuaQiInvestmentStyle
=
changeEnumValue
(
configEnum
.
FUHUAQILNVESTMENTSTYLE
,
info
.
fuHuaQiInvestmentStyle
);
...
...
src/biz/admin/fuHuaQi/fuHuaQi.ts
View file @
23b1b9f7
...
...
@@ -62,9 +62,12 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
selectParam
.
operationName
=
{
"$regex"
:
`
${
name
}
`
};
}
let
enterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
({
draftLock
:
true
});
//计算孵化器拥有的累计企业数量
let
shiTiEnterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
({
draftLock
:
true
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
});
//实体
let
xuNiEnterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
({
draftLock
:
true
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
});
//虚拟
let
startEnterpriseParam
:
any
=
{
"$or"
:[{
"$and"
:[{
"draftLock"
:
true
},
{
"taskId"
:{
"$ne"
:
null
}}]},
{
"$and"
:[{
"draftLock"
:
false
},
{
"taskId"
:
null
}]}]};
let
enterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
(
startEnterpriseParam
);
//计算孵化器拥有的累计企业数量
startEnterpriseParam
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
let
shiTiEnterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
(
startEnterpriseParam
);
//实体
startEnterpriseParam
.
state
=
configEnum
.
FUHUASTATE
.
虚拟孵化
;
let
xuNiEnterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
(
startEnterpriseParam
);
//虚拟
let
dataBaseList
=
await
fuhuaqiData
.
findFuHuaQiListByPage
(
selectParam
,
(
page
-
1
)
*
10
);
...
...
@@ -79,9 +82,9 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
changeData
.
enterpriseTotal
=
enterpriseMap
[
info
.
uscc
]
||
0
;
//企业孵化总数(包括历史)
changeData
.
virtualEnterpriseNum
=
xuNiEnterpriseMap
[
info
.
uscc
]
||
0
;
//虚拟企业数量
changeData
.
shiTiEnterpriseNum
=
shiTiEnterpriseMap
[
info
.
uscc
]
||
0
;
//实体企业数量
changeData
.
zaiFuEnterpriseNum
=
changeData
.
shiTiEnterpriseNum
+
changeData
.
virtualEnterpriseNum
;
let
outEnterpriseNum
=
changeData
.
enterpriseTotal
-
changeData
.
zaiFuEnterpriseNum
;
changeData
.
outEnterpriseNum
=
outEnterpriseNum
<
0
?
0
:
outEnterpriseNum
;
changeData
.
zaiFuEnterpriseNum
=
changeData
.
shiTiEnterpriseNum
+
changeData
.
virtualEnterpriseNum
;
//在孵
let
outEnterpriseNum
=
changeData
.
enterpriseTotal
-
changeData
.
zaiFuEnterpriseNum
;
changeData
.
outEnterpriseNum
=
outEnterpriseNum
<
0
?
0
:
outEnterpriseNum
;
//迁出
/**备案地址转换 */
...
...
@@ -167,9 +170,12 @@ export async function outPutFuHuaQiBaseData(lv:number, institutionalNature:numbe
}
}
let
enterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
({
draftLock
:
true
});
//计算孵化器拥有的累计企业数量
let
shiTiEnterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
({
draftLock
:
true
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
});
//实体
let
xuNiEnterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
({
draftLock
:
true
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
});
//虚拟
let
startEnterpriseParam
:
any
=
{
"$or"
:[{
"$and"
:[{
"draftLock"
:
true
},
{
"taskId"
:{
"$ne"
:
null
}}]},
{
"$and"
:[{
"draftLock"
:
false
},
{
"taskId"
:
null
}]}]};
let
enterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
(
startEnterpriseParam
);
//计算孵化器拥有的累计企业数量
startEnterpriseParam
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
let
shiTiEnterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
(
startEnterpriseParam
);
//实体
startEnterpriseParam
.
state
=
configEnum
.
FUHUASTATE
.
虚拟孵化
;
let
xuNiEnterpriseMap
=
await
enterpriseData
.
groupFindEnterpriseCountByParam
(
startEnterpriseParam
);
//虚拟
let
dataBaseList
=
await
fuhuaqiData
.
findFuHuaQiList
(
selectParam
);
...
...
src/biz/admin/fuHuaQi/month.ts
View file @
23b1b9f7
...
...
@@ -33,11 +33,14 @@ export async function monthTableList(state:number, year:number, month:number, pa
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
let
state
=
info
.
draftLock
==
false
?
'未填报'
:
'已填报'
;
let
occupancyRate
=
info
.
occupancyRate
==
null
||
info
.
occupancyRate
==
undefined
?
'-'
:
info
.
occupancyRate
;
if
(
state
==
"未填报"
&&
occupancyRate
!=
"-"
)
state
=
"填写未提交"
;
let
onceInfo
=
{
operationName
:
operationNameMap
[
info
.
fuHuaQiUscc
]
||
''
,
state
:
info
.
draftLock
==
false
?
'未填报'
:
'已填报'
,
time
:
`
${
info
.
year
}
年
${
info
.
month
}
月`
,
occupancyRate
:
info
.
occupancyRate
||
'-'
state
,
occupancyRate
};
dataList
.
push
(
onceInfo
);
});
...
...
@@ -72,11 +75,14 @@ export async function outPutMonthTableList(state:number, year:number, month:numb
let
titleList
=
[
"运营机构名称"
,
"填报状态"
,
"数据月份"
,
"出租率(%)"
];
let
dataList
=
[
titleList
];
dataBaseList
.
forEach
(
info
=>
{
let
state
=
info
.
draftLock
==
false
?
'未填报'
:
'已填报'
;
let
occupancyRate
=
info
.
occupancyRate
==
null
||
info
.
occupancyRate
==
undefined
?
'-'
:
info
.
occupancyRate
;
if
(
state
==
"未填报"
&&
occupancyRate
!=
"-"
)
state
=
"填写未提交"
;
let
onceInfo
=
{
operationName
:
operationNameMap
[
info
.
fuHuaQiUscc
],
state
:
info
.
draftLock
==
false
?
'未填报'
:
'已填报'
,
operationName
:
operationNameMap
[
info
.
fuHuaQiUscc
]
||
''
,
time
:
`
${
info
.
year
}
年
${
info
.
month
}
月`
,
occupancyRate
:
info
.
occupancyRate
||
'-'
state
,
occupancyRate
};
let
subList
=
[];
...
...
src/biz/admin/provide.ts
View file @
23b1b9f7
...
...
@@ -474,4 +474,17 @@ export async function initEnterprisePwd() {
console
.
log
(
"补全企业密码成功"
,
result
.
length
);
return
{}
}
export
async
function
addFinancingIndustry
()
{
let
dataList
=
await
financingData
.
findFinancingList
({});
for
(
let
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
let
{
uscc
,
fuHuaQiUscc
,
name
,
taskId
}
=
dataList
[
i
];
let
enterInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
let
finInfo
=
await
financingData
.
findFinancingInfoByTaskIdAndSucc
(
taskId
,
uscc
);
finInfo
.
industry
=
JSON
.
parse
(
JSON
.
stringify
(
enterInfo
.
industry
));
finInfo
.
save
();
}
console
.
log
(
"补全融资领域成功"
,
dataList
.
length
);
return
{}
}
\ No newline at end of file
src/biz/admin/stats/fuHuaQi/baseData.ts
View file @
23b1b9f7
...
...
@@ -3,9 +3,10 @@
* 作者:lxm
*/
import
moment
=
require
(
"moment"
);
import
{
GuanWeiHuiChnageFuHuaQiBaseConfig
}
from
"../../../../config/eccParam/admin"
;
import
{
OrganizationParamUpdateConfig
}
from
"../../../../config/eccParam/fuHuaQi"
;
import
{
FUHUAINDUSTRY
,
FUHUAQILV
,
IN
STITUTIONALNATURE
,
OPERATIONMODEL
,
SCOREWAYS
}
from
"../../../../config/enum"
;
import
{
FUHUAINDUSTRY
,
FUHUAQILV
,
IN
DUSTRY
,
INSTITUTIONALNATURE
,
OPERATIONMODEL
,
SCOREWAYS
,
STATEENUM
}
from
"../../../../config/enum"
;
import
{
ERRORENUM
}
from
"../../../../config/errorEnum"
;
import
{
StarConfig
}
from
"../../../../config/scoreConfig"
;
import
{
findFuHuaQiByUSCC
}
from
"../../../../data/fuHuaQi/fuhuaqi"
;
...
...
@@ -14,7 +15,7 @@ import * as zjBeyondLayoutData from "../../../../data/fuHuaQi/instituQualify/zjB
import
*
as
scoreData
from
"../../../../data/fuHuaQi/score"
;
import
{
BizError
}
from
"../../../../util/bizError"
;
import
{
checkChange
}
from
"../../../../util/piecemeal"
;
import
{
eccEnumValue
}
from
"../../../../util/verificationEnum"
;
import
{
changeEnumValue
,
eccEnumValue
}
from
"../../../../util/verificationEnum"
;
import
{
eccFormParam
}
from
"../../../../util/verificationParam"
;
import
{
updateScore
}
from
"../../../mobileFuHuaQi/fuHuaQi/score"
;
...
...
@@ -43,11 +44,12 @@ export async function fuHuaQiBaseData(uscc:string) {
operationName
:
fuHuaQiInfo
.
operationName
,
//运营机构名称 不可修改
name
,
//名称
uscc
:
fuHuaQiInfo
.
uscc
,
//统一信用代码 也是登录账号 不可修改
lv
:
fuHuaQiInfo
.
lv
,
//孵化器级别
identificationTime
:
fuHuaQiInfo
.
identificationTime
,
//认定时间
industry
:
fuHuaQiInfo
.
industry
,
//孵化领域
institutionalNature
:
fuHuaQiInfo
.
institutionalNature
,
//机构性质
isCreatePTP
:
fuHuaQiInfo
.
isCreatePTP
,
//是成立创投基金
lv
:
changeEnumValue
(
FUHUAQILV
,
fuHuaQiInfo
.
lv
),
//孵化器级别
identificationTime
:
moment
(
fuHuaQiInfo
.
identificationTime
).
format
(
"YYYY-MM-DD"
),
//认定时间
logonTime
:
moment
(
fuHuaQiInfo
.
logonTime
).
format
(
"YYYY-MM-DD"
),
//注册时间
industry
:
changeEnumValue
(
INDUSTRY
,
fuHuaQiInfo
.
industry
),
//孵化领域
institutionalNature
:
changeEnumValue
(
INSTITUTIONALNATURE
,
fuHuaQiInfo
.
institutionalNature
),
//机构性质
isCreatePTP
:
changeEnumValue
(
STATEENUM
,
fuHuaQiInfo
.
isCreatePTP
),
//是成立创投基金
liaison
:
fuHuaQiInfo
.
liaison
,
//联系人
personInCharge
:
fuHuaQiInfo
.
personInCharge
,
//负责人
personInChargePhone
:
fuHuaQiInfo
.
personInChargePhone
,
//负责人联系电话
...
...
src/biz/admin/stats/fuHuaQi/operate.ts
View file @
23b1b9f7
...
...
@@ -18,16 +18,28 @@ import { changeEnumValue } from "../../../../util/verificationEnum";
* @param uscc
*/
export
async
function
fuHuaQiOperateStats
(
uscc
:
string
,
year
:
number
)
{
let
enterpriseTotal
=
await
findEnterpriseCountByFuHuaQiUscc
(
uscc
);
//非迁出企业总数
let
virtualEnterpriseNum
=
await
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
FUHUASTATE
.
虚拟孵化
,
draftLock
:
true
})
||
0
;
//虚拟孵化
let
selectParam
=
{
state
:
{
"$ne"
:
FUHUASTATE
.
迁出
},
fuHuaQiUscc
:
uscc
,
"$or"
:[{
"$and"
:[{
"draftLock"
:
true
},
{
"taskId"
:{
"$ne"
:
null
}}]},
{
"$and"
:[{
"draftLock"
:
false
},
{
"taskId"
:
null
}]}]
//未提交的企业不能查看
};
let
enterpriseTotal
=
await
findEnterpriseCount
(
selectParam
);
//非迁出企业总数
let
xuniSelectParam
=
{
state
:
FUHUASTATE
.
虚拟孵化
,
fuHuaQiUscc
:
uscc
,
"$or"
:[{
"$and"
:[{
"draftLock"
:
true
},
{
"taskId"
:{
"$ne"
:
null
}}]},
{
"$and"
:[{
"draftLock"
:
false
},
{
"taskId"
:
null
}]}]
//未提交的企业不能查看
};
let
virtualEnterpriseNum
=
await
findEnterpriseCount
(
xuniSelectParam
);
//虚拟孵化
let
monthTableDataList
=
await
findMonthTableList
({
uscc
,
year
});
let
monthTableDataList
=
await
findMonthTableList
({
fuHuaQiUscc
:
uscc
,
year
});
monthTableDataList
.
sort
((
a
,
b
)
=>
{
return
a
.
month
-
b
.
month
});
let
czlbhqs
=
{
monthList
:[],
dataList
:[]};
monthTableDataList
.
forEach
(
info
=>
{
let
{
month
,
occupancyRate
}
=
info
;
czlbhqs
.
monthList
.
push
(
month
);
let
{
month
,
occupancyRate
,
draftLock
}
=
info
;
czlbhqs
.
monthList
.
push
(
`
${
month
}
月`
);
if
(
!
draftLock
)
occupancyRate
=
"未填报"
;
czlbhqs
.
dataList
.
push
(
occupancyRate
);
});
...
...
@@ -64,30 +76,27 @@ export async function fuHuaQiOperateStats(uscc:string, year:number) {
* @param uscc
*/
async
function
getFuHuaQiOwnEnterpriseCountStats
(
uscc
:
string
,
year
:
number
)
{
let
dataStartMs
=
new
Date
().
valueOf
();
let
dataEndMs
=
new
Date
().
valueOf
();
if
(
year
!=
new
Date
().
getFullYear
())
{
dataStartMs
=
new
Date
(
year
+
"-01-01 00:00:00"
).
valueOf
();
dataEndMs
=
new
Date
((
year
+
1
)
+
"-01-01 00:00:00"
).
valueOf
();
}
else
{
dataStartMs
=
new
Date
(
moment
().
subtract
(
12
,
'months'
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
).
valueOf
();
}
let
dataStartMs
=
new
Date
(
moment
().
subtract
(
6
,
'months'
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
).
valueOf
();
let
param
=
{
uid
:
uscc
,
ct
:{
"$gt"
:
dataStartMs
,
"$lt"
:
dataEndMs
},
ct
:{
"$gt"
:
dataStartMs
},
};
let
pointDataList
=
await
getPointDataByParam
(
POINTTYPEENUM
.
孵化器
,
FUHUAQINODEENUM
.
企业状态变化
,
param
);
let
distinctMap
=
{};
//{ month:{ct:xxx, dataInfo:{} } }
let
distinctMap
=
{};
//{ month:{ct:xxx, pointInfo:{} } }
for
(
let
i
=
1
;
i
<=
6
;
i
++
)
{
let
key
=
moment
().
subtract
(
i
,
'months'
).
format
(
"YYYY-MM"
);
distinctMap
[
key
]
=
{
ct
:
0
,
pointInfo
:{}};
}
/**获取每个月的最后一次改动 */
pointDataList
.
forEach
(
info
=>
{
let
{
p1
,
ct
}
=
info
;
let
pointInfo
=
JSON
.
parse
(
p1
);
let
dataMonth
=
new
Date
(
ct
).
getMonth
()
+
1
;
let
dataMonth
=
moment
(
ct
).
format
(
"YYYY-MM"
)
;
if
(
!
distinctMap
[
dataMonth
])
distinctMap
[
dataMonth
]
=
{
ct
,
pointInfo
}
;
if
(
!
distinctMap
[
dataMonth
])
console
.
log
(
"数据异常 不符合范围之内的值 检查点1003"
)
;
else
if
(
distinctMap
[
dataMonth
].
ct
<
ct
)
distinctMap
[
dataMonth
]
=
{
ct
,
pointInfo
};
});
...
...
@@ -104,59 +113,66 @@ async function getFuHuaQiOwnEnterpriseCountStats(uscc:string, year:number) {
let
monthData
=
[];
dataList
.
forEach
(
info
=>
{
let
{
month
,
xn
,
st
}
=
info
;
monthData
.
push
(
month
);
monthData
.
push
(
`
${
month
}
月`
);
xnData
.
push
(
xn
);
stData
.
push
(
st
);
});
return
{
xnData
,
stData
,
monthData
}
}
// async function newGetFuHuaQiEnterpriseCountStats(uscc:string, year:number) {}
/**
* 毕业企业数量变化趋势
* 毕业企业数量变化趋势
* @param uscc
* @param year
* @returns
*/
async
function
getFuHuaQiOwnEnterpriseGraduateCountStats
(
uscc
:
string
,
year
:
number
)
{
let
dataStartMs
=
new
Date
().
valueOf
();
let
dataEndMs
=
new
Date
().
valueOf
();
if
(
year
!=
new
Date
().
getFullYear
())
{
dataStartMs
=
new
Date
(
year
+
"-01-01 00:00:00"
).
valueOf
();
dataEndMs
=
new
Date
((
year
+
1
)
+
"-01-01 00:00:00"
).
valueOf
();
}
else
{
dataStartMs
=
new
Date
(
moment
().
subtract
(
12
,
'months'
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
).
valueOf
();
}
let
dataStartMs
=
new
Date
(
moment
().
subtract
(
6
,
'months'
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
).
valueOf
();
let
param
=
{
uid
:
uscc
,
ct
:{
"$gt"
:
dataStartMs
,
"$lt"
:
dataEndMs
},
ct
:{
"$gt"
:
dataStartMs
},
};
let
pointDataList
=
await
getPointDataByParam
(
POINTTYPEENUM
.
孵化器
,
FUHUAQINODEENUM
.
我的企业
_
孵化状态
,
param
);
let
monthDataMap
=
{};
for
(
let
i
=
1
;
i
<=
6
;
i
++
)
{
let
key
=
moment
().
subtract
(
i
,
'months'
).
format
(
"YYYY-MM"
);
monthDataMap
[
key
]
=
{
ct
:
0
,
month
:
key
,
count
:
0
,
graduation
:
0
};
}
pointDataList
.
forEach
(
info
=>
{
let
{
p2
,
ct
}
=
info
;
let
{
state
,
moveOutType
}
=
JSON
.
parse
(
p2
);
let
{
state
,
moveOutType
,
graduation
}
=
JSON
.
parse
(
p2
);
let
dataMonth
=
new
Date
(
ct
).
getMonth
()
+
1
;
let
dataMonth
=
moment
(
ct
).
format
(
"YYYY-MM"
)
;
if
(
state
==
FUHUASTATE
.
迁出
&&
moveOutType
==
MOVEOUTTYPE
.
毕业迁出
)
{
if
(
!
monthDataMap
[
dataMonth
])
monthDataMap
[
dataMonth
]
=
{
ct
,
month
:
dataMonth
,
count
:
0
}
monthDataMap
[
dataMonth
].
count
+=
1
;
if
(
!
monthDataMap
[
dataMonth
])
{
console
.
log
(
"数据异常 不符合范围之内的值 检查点1002"
);
}
else
{
monthDataMap
[
dataMonth
].
count
+=
1
;
monthDataMap
[
dataMonth
].
graduation
=
Math
.
max
(
graduation
||
0
,
monthDataMap
[
dataMonth
].
graduation
);
monthDataMap
[
dataMonth
].
ct
=
ct
;
monthDataMap
[
dataMonth
].
month
=
dataMonth
;
}
}
});
let
dataList
=
Object
.
values
(
monthDataMap
);
let
monthData
=
[];
let
graduateData
=
[];
let
nbyData
=
[];
dataList
.
forEach
(
info
=>
{
let
{
month
,
count
}:
any
=
info
;
let
{
month
,
count
,
graduation
}:
any
=
info
;
monthData
.
push
(
month
);
graduateData
.
push
(
count
)
graduateData
.
push
(
count
);
nbyData
.
push
(
graduation
);
});
//todo 这缺一个 拟毕业
return
{
monthData
,
graduateData
};
return
{
monthData
,
graduateData
,
nbyData
};
}
async
function
getEnterpriseIndustry
(
uscc
:
string
,
year
:
number
)
{
...
...
src/biz/admin/stats/fuHuaQi/valueAnalysis.ts
View file @
23b1b9f7
...
...
@@ -3,6 +3,7 @@
* 作者:lxm
*/
import
moment
=
require
(
"moment"
);
import
{
findTeamDataByParams
}
from
"../../../../data/enterprise/quarterTask/team"
;
import
*
as
i18nRegisterData
from
"../../../../data/fuHuaQi/instituQualify/i18nRegister"
;
import
*
as
icrData
from
"../../../../data/fuHuaQi/instituQualify/icr"
;
...
...
@@ -14,62 +15,99 @@ export async function getValueStats(uscc) {
let
i18nCount
=
await
i18nRegisterData
.
getCount
(
uscc
);
//国际合作/大企业合作机构数
let
icrCount
=
await
icrData
.
getCount
(
uscc
);
//大学/科研院所合作机构
let
businessData
=
await
findBusinessDataByParam
({
fuHuaQiUscc
:
uscc
,
year
:
ThisYear
});
businessData
.
sort
((
a
,
b
)
=>
{
return
a
.
quarter
-
b
.
quarter
});
let
queryDataMap
=
{
1
:{
TP
:
0
,
member
:
0
},
2
:{
TP
:
0
,
member
:
0
},
3
:{
TP
:
0
,
member
:
0
},
4
:{
TP
:
0
,
member
:
0
}
};
/**季度任务查询条件 */
let
queryDataMap
=
{
};
//格式 {"YYYY-季度":{TP:0, member:0, index:1}},
let
quarterTaskParam
:
any
=
{
fuHuaQiUscc
:
uscc
};
let
{
declarationYear
,
declarationQuarter
}
=
getDeclarationTime
();
if
(
ThisYear
!=
declarationYear
)
{
quarterTaskParam
.
year
=
declarationYear
;
for
(
let
i
=
1
;
i
<=
4
;
i
++
)
{
let
key
=
`
${
declarationYear
}
-Q
${
i
}
`
;
queryDataMap
[
key
]
=
{
key
,
TP
:
0
,
member
:
0
,
index
:
i
};
}
}
else
{
quarterTaskParam
[
"$or"
]
=
[
{
year
:
ThisYear
},
{
year
:
declarationYear
,
declarationQuarter
:{
"$gte"
:
declarationQuarter
+
1
}}
];
for
(
let
i
=
4
;
i
>=
(
declarationQuarter
+
1
);
i
--
)
{
let
key
=
`
${
declarationYear
}
-Q
${
i
}
`
;
queryDataMap
[
key
]
=
{
key
,
TP
:
0
,
member
:
0
,
index
:
4
-
i
};
}
for
(
let
i
=
1
;
i
<
(
declarationQuarter
+
1
);
i
++
)
{
let
key
=
`
${
ThisYear
}
-Q
${
i
}
`
;
queryDataMap
[
key
]
=
{
key
,
TP
:
0
,
member
:
0
,
index
:
4
+
i
};
}
}
let
businessData
=
await
findBusinessDataByParam
(
quarterTaskParam
);
businessData
.
forEach
(
info
=>
{
let
{
quarter
,
TP
}
=
info
;
queryDataMap
[
quarter
].
TP
=
TP
;
let
{
quarter
,
year
,
TP
}
=
info
;
queryDataMap
[
`
${
year
}
-Q
${
quarter
}
`
].
TP
=
TP
;
});
let
teamData
=
await
findTeamDataByParams
(
{
fuHuaQiUscc
:
uscc
,
year
:
ThisYear
}
);
let
teamData
=
await
findTeamDataByParams
(
quarterTaskParam
);
teamData
.
forEach
(
info
=>
{
let
{
quarter
}
=
info
;
let
{
year
,
quarter
}
=
info
;
let
quarterDataCount
=
0
;
quarterDataCount
+=
info
.
doctor
||
0
;
//博士
quarterDataCount
+=
info
.
master
||
0
;
//硕士
quarterDataCount
+=
info
.
undergraduate
||
0
;
//本科
quarterDataCount
+=
info
.
juniorCollege
||
0
;
//专科
quarterDataCount
+=
info
.
other
||
0
;
//其他
queryDataMap
[
quarter
].
member
+=
quarterDataCount
;
queryDataMap
[
`
${
year
}
-Q
${
quarter
}
`
].
member
+=
quarterDataCount
;
});
let
quaryDataRank
=
Object
.
values
(
queryDataMap
).
sort
((
a
:
any
,
b
:
any
)
=>
{
return
a
.
index
-
b
.
index
});
let
tpList
=
[];
let
jyrsqsList
=
[];
let
queryList
=
[];
for
(
let
key
in
queryDataMap
)
{
queryList
.
push
(
parseInt
(
key
)
);
tpList
.
push
(
queryDataMap
[
key
]
.
TP
);
jyrsqsList
.
push
(
queryDataMap
[
key
]
.
member
);
}
quaryDataRank
.
forEach
((
info
:
any
)
=>
{
queryList
.
push
(
info
.
key
);
tpList
.
push
(
info
.
TP
);
jyrsqsList
.
push
(
info
.
member
);
}
);
/**融资企业数量趋势 */
let
startTime
=
new
Date
(
`
${
ThisYear
}
-01-01 00:00:00`
).
valueOf
();
let
endTime
=
new
Date
(
`
${
ThisYear
+
1
}
-01-01 00:00:00`
).
valueOf
();
let
financingData
=
await
findFinancingList
({
fuHuaQiUscc
:
uscc
,
timeToObtainInvestment
:{
"$gt"
:
startTime
,
"$lt"
:
endTime
}
});
let
startTime
=
new
Date
(
moment
().
subtract
(
6
,
'months'
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
).
valueOf
();
let
financingData
=
await
findFinancingList
({
fuHuaQiUscc
:
uscc
,
timeToObtainInvestment
:{
"$gt"
:
startTime
}
});
let
financingMap
=
{};
//结构 {"YYYY-MM":{distinctKey:0,} }
let
financingMap
=
{};
//结构 {month:{distinctKey:0,} }
for
(
let
i
=
1
;
i
<=
6
;
i
++
)
{
let
key
=
moment
().
subtract
(
i
,
'months'
).
format
(
"YYYY-MM"
);
let
ms
=
moment
().
subtract
(
i
,
'months'
).
valueOf
();
financingMap
[
key
]
=
{
ms
,
key
,
data
:{}};
}
financingData
.
forEach
(
info
=>
{
let
{
uscc
,
investmentInstitutionsName
,
timeToObtainInvestment
}
=
info
;
let
distinctKey
=
uscc
+
investmentInstitutionsName
+
timeToObtainInvestment
;
let
month
=
new
Date
(
timeToObtainInvestment
).
getMonth
()
+
1
;
if
(
!
financingMap
[
month
]
)
financingMap
[
month
]
=
{}
;
financingMap
[
month
][
distinctKey
]
=
1
;
let
month
=
moment
(
timeToObtainInvestment
).
format
(
"YYYY-MM"
)
;
if
(
!
financingMap
[
month
])
console
.
log
(
"数据异常 不符合范围之内的值 检查点1001"
)
;
financingMap
[
month
]
.
data
[
distinctKey
]
=
1
;
});
let
financingRankList
=
Object
.
values
(
financingMap
).
sort
((
a
:
any
,
b
:
any
)
=>
{
return
a
.
ms
-
b
.
ms
});
let
rzqyslqs
=
[];
for
(
let
key
in
financingMap
)
{
let
count
=
Object
.
keys
(
financingMap
[
key
]);
financingRankList
.
forEach
((
info
:
any
)
=>
{
let
{
data
,
ms
,
key
}
=
info
;
let
count
=
Object
.
keys
(
data
||
{}).
length
;
rzqyslqs
.
push
({
month
:
parseInt
(
key
)
,
month
:
key
,
count
});
}
}
);
return
{
jyrsqs
:{
jyrsqsList
,
queryList
},
i18nCount
,
icrCount
,
rzqyslqs
,
tpInfo
:{
tpList
,
queryList
}
};
}
function
getDeclarationTime
()
{
let
thisYear
=
new
Date
().
getFullYear
();
let
thisQuarter
=
moment
().
quarter
();
//当月填报季度
if
(
(
thisQuarter
-
1
)
<
1
)
{
thisYear
=
moment
().
subtract
(
1
,
'years'
).
year
();
thisQuarter
=
4
;
}
else
thisQuarter
=
thisQuarter
-
1
;
return
{
declarationYear
:
thisYear
,
declarationQuarter
:
thisQuarter
};
}
\ No newline at end of file
src/biz/admin/stats/guanWeiHui/enterpriseBase.ts
View file @
23b1b9f7
...
...
@@ -18,9 +18,9 @@ export async function enterpriseBaseData() {
let
businessData
=
await
statsBusinessDataByParam
();
let
businessDataList
=
[
//经营数据
{
key
:
"营业收入"
,
count
:
businessData
.
BICount
},
//营业收入
{
key
:
"研发投入"
,
count
:
businessData
.
RDCount
},
//研发投入
{
key
:
"纳税"
,
count
:
businessData
.
TXPCount
}
//纳税
{
key
:
"营业收入"
,
count
:
Math
.
round
(
businessData
.
BICount
/
10000
)
},
//营业收入
{
key
:
"研发投入"
,
count
:
Math
.
round
(
businessData
.
RDCount
/
10000
)
},
//研发投入
{
key
:
"纳税"
,
count
:
Math
.
round
(
businessData
.
TXPCount
/
10000
)
}
//纳税
];
let
intellectualPropertyData
=
await
statsIntellectualPropertyData
();
...
...
@@ -34,8 +34,8 @@ export async function enterpriseBaseData() {
let
gjylcrCount
=
0
;
//国际一流人才
let
initalTeamsList
=
await
statsEnterpriseInitalTeamsType
();
initalTeamsList
.
forEach
(
item
=>
{
if
(
item
.
_id
==
ENTERPRISETEAM
.
国内一流人才
)
gnylcrCount
=
item
.
count
;
else
if
(
item
.
_id
==
ENTERPRISETEAM
.
国际一流人才
)
gjylcrCount
=
item
.
count
;
if
(
item
.
_id
==
ENTERPRISETEAM
.
国内一流人才
)
gnylcrCount
+
=
item
.
count
;
else
if
(
item
.
_id
==
ENTERPRISETEAM
.
国际一流人才
)
gjylcrCount
+
=
item
.
count
;
});
let
gnylrczb
=
Math
.
round
(
gjylcrCount
/
(
gjylcrCount
+
gnylcrCount
)
*
100
)
/
100
let
gjylrczb
=
1
-
gnylrczb
;
...
...
@@ -55,8 +55,9 @@ export async function enterpriseBaseData() {
financingStatsList
.
sort
((
a
,
b
)
=>
{
return
a
.
ms
-
b
.
ms
});
let
financingTrendList
=
[];
//融资趋势
financingStatsList
.
forEach
(
info
=>
{
let
month
=
new
Date
(
info
.
ms
).
getMonth
()
+
1
;
financingTrendList
.
push
({
month
:
info
.
month
,
key
:
month
+
'月'
,
count
:
info
.
count
});
});
...
...
src/biz/admin/stats/guanWeiHui/fuHuaQiWarning.ts
View file @
23b1b9f7
...
...
@@ -34,7 +34,8 @@ export async function fuHuaQiWarningOverView() {
lowMonthData
.
forEach
(
info
=>
{
let
{
fuHuaQiUscc
,
occupancyRate
}
=
info
;
let
name
=
fuHuaQiNameMap
[
fuHuaQiUscc
];
lowOccupancyRate
.
push
({
name
,
occupancyRate
,
uscc
:
fuHuaQiUscc
});
let
value
=
occupancyRate
==
null
||
occupancyRate
==
undefined
?
"未填报"
:
occupancyRate
;
lowOccupancyRate
.
push
({
name
,
value
,
uscc
:
fuHuaQiUscc
});
});
...
...
@@ -53,9 +54,9 @@ export async function fuHuaQiWarningOverView() {
for
(
let
key
in
taskReportingMap
)
{
let
{
submit
,
notSubmit
}
=
taskReportingMap
[
key
];
let
itemReportingRate
=
Math
.
round
(
submit
/
(
submit
+
notSubmit
)
*
100
);
rankList
.
push
({
name
:
fuHuaQiNameMap
[
key
],
rat
e
:
itemReportingRate
,
uscc
:
key
});
rankList
.
push
({
name
:
fuHuaQiNameMap
[
key
],
valu
e
:
itemReportingRate
,
uscc
:
key
});
}
rankList
.
sort
(
(
a
,
b
)
=>
{
return
a
.
itemReportingRate
-
b
.
itemReportingRat
e
});
rankList
.
sort
(
(
a
,
b
)
=>
{
return
a
.
value
-
b
.
valu
e
});
let
lowReportingRate
=
rankList
.
slice
(
0
,
5
)
//低填报率
...
...
@@ -175,7 +176,7 @@ export async function fuHuaQiTPAnomaly(page:number) {
let
name
=
fuHuaQiNameMap
[
fuHuaQiUscc
];
let
bcos
=
""
;
if
(
!
draftLock
)
bcos
=
"上季度未提交"
;
else
bcos
=
"提交数据为0"
else
bcos
=
"
上季度
提交数据为0"
dataMap
[
fuHuaQiUscc
]
=
{
name
,
TP
,
bcos
};
});
if
((
declarationQuarter
-
1
)
==
0
)
{
...
...
@@ -214,7 +215,7 @@ async function getFuHuaQiTPAnomalyCount(fuHuaQiNameMap) {
let
name
=
fuHuaQiNameMap
[
fuHuaQiUscc
];
let
bcos
=
""
;
if
(
!
draftLock
)
bcos
=
"上季度未提交"
;
else
bcos
=
"提交数据为0"
else
bcos
=
"
上季度
提交数据为0"
dataMap
[
fuHuaQiUscc
]
=
{
name
,
TP
,
bcos
};
});
if
((
declarationQuarter
-
1
)
==
0
)
{
...
...
src/biz/admin/stats/guanWeiHui/fuhuaqiBase.ts
View file @
23b1b9f7
...
...
@@ -33,7 +33,6 @@ export async function fuHuaQiBaseData() {
if
(
!
institutionalNatureMap
[
institutionalStr
])
institutionalNatureMap
[
institutionalStr
]
=
{
count
:
0
,
key
:
institutionalStr
};
institutionalNatureMap
[
institutionalStr
].
count
+=
1
;
logonTime
=
new
Date
(
'2023-02-01 00:11:00'
)
if
(
logonTime
)
{
let
ago
=
moment
(
logonTime
).
fromNow
(
true
);
if
(
ago
.
indexOf
(
'months'
)
>
-
1
)
{
...
...
@@ -86,10 +85,10 @@ export async function fuHuaQiBaseData() {
async
function
czlqs
()
{
let
dataList
=
[];
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
let
dataMonth
=
moment
().
subtract
(
6
,
'months'
).
month
()
+
1
let
dataYear
=
moment
().
subtract
(
6
,
'months'
).
year
();
let
ms
=
moment
().
subtract
(
6
,
'months'
).
valueOf
();
for
(
let
i
=
1
;
i
<=
6
;
i
++
)
{
let
dataMonth
=
moment
().
subtract
(
i
,
'months'
).
month
()
+
1
let
dataYear
=
moment
().
subtract
(
i
,
'months'
).
year
();
let
ms
=
moment
().
subtract
(
i
,
'months'
).
valueOf
();
let
dataSum
=
await
statsFuHuaQiMonthDataCount
(
dataYear
,
dataMonth
);
let
dataCount
=
await
findMonthTableListCount
({
year
:
dataYear
,
month
:
dataMonth
,
draftLock
:
true
});
...
...
src/biz/mobileEnterprise/user.ts
View file @
23b1b9f7
...
...
@@ -9,6 +9,9 @@ import * as sysTools from "../../tools/system";
import
{
BizError
}
from
"../../util/bizError"
;
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
moment
=
require
(
"moment"
);
import
*
as
codeData
from
"../../data/fuHuaQi/code"
;
import
{
sendChangePwdCode
}
from
"../sms"
;
import
{
CODETYPE
}
from
"../../config/enum"
;
/**
* 企业登录
...
...
@@ -71,7 +74,6 @@ export async function firstChangePwd(uscc:string, pwd:string, confirmPwd:string)
/**
* 找回密码
* todo 有问题, 企业没有负责人
* @param phone 负责人电话号码 如果和库里的对不上 就要报错
* @param uscc 企业统一信用代码
* @param code 验证码
...
...
@@ -79,35 +81,82 @@ export async function firstChangePwd(uscc:string, pwd:string, confirmPwd:string)
* @param confirmPwd 确认密码
*/
export
async
function
resettingPwd
(
phone
:
string
,
uscc
:
string
,
code
:
string
,
pwd
:
string
,
confirmPwd
:
string
)
{
// if (!sysTools.eccUscc(uscc)) throw new BizError(ERRORENUM.统一社会信用代码不合法, '重置密码时');
// let enterpriseInfo = await enterpriseData.findEnterpriseByUscc(uscc);
// if (!enterpriseInfo) throw new BizError(ERRORENUM.账号不存在, `重置密码时 uscc:${uscc}`);
// if ( phone != fuHuaQiInfo.personInChargePhone) throw new BizError(ERRORENUM.号码与主体不一致, '修改密码发验证码时');
// if (pwd != confirmPwd) throw new BizError(ERRORENUM.密码不一致);
// if (pwd.search(/^[A-Za-z0-9]{6,18}$/) < 0) throw new BizError(ERRORENUM.密码只能由6至18位字符和数字组成);
if
(
!
sysTools
.
eccUscc
(
uscc
))
throw
new
BizError
(
ERRORENUM
.
统一社会信用代码不合法
,
'重置密码时'
);
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
if
(
!
enterpriseInfo
)
throw
new
BizError
(
ERRORENUM
.
账号不存在
,
`重置密码时 uscc:
${
uscc
}
`
);
if
(
!
enterpriseInfo
.
securePhon
)
throw
new
BizError
(
ERRORENUM
.
未填安全手机号无法修改密码
,
'企业-修改密码发验证码时-没有安全手机号'
);
if
(
phone
!=
enterpriseInfo
.
securePhon
)
throw
new
BizError
(
ERRORENUM
.
号码与主体不一致
,
'企业-修改密码发验证码时'
);
if
(
pwd
!=
confirmPwd
)
throw
new
BizError
(
ERRORENUM
.
密码不一致
);
if
(
pwd
.
search
(
/^
[
A-Za-z0-9
]{6,18}
$/
)
<
0
)
throw
new
BizError
(
ERRORENUM
.
密码只能由
6
至
18
位字符和数字组成
);
let
todayMs
=
sysTools
.
getTodayMs
();
let
codeList
=
await
codeData
.
findTodayCodeByUscc
(
uscc
,
todayMs
);
let
now
=
new
Date
().
valueOf
();
let
codeId
=
''
;
let
msg
=
ERRORENUM
.
验证码错误
;
codeList
.
forEach
(
info
=>
{
if
(
info
.
code
==
code
)
{
if
(
info
.
isUse
)
msg
=
ERRORENUM
.
验证码失效
;
else
if
(
(
now
-
info
.
sendMs
)
>
(
30
*
60
*
1000
)
)
msg
=
ERRORENUM
.
验证码过期
else
codeId
=
info
.
id
;
}
});
if
(
!
codeId
)
throw
new
BizError
(
msg
,
`uscc:
${
uscc
}
重置密码的code:
${
code
}
`
);
await
codeData
.
updateCodeState
(
codeId
);
enterpriseInfo
.
pwd
=
sysTools
.
getPwdMd5
(
uscc
,
sysTools
.
md5PwdStr
(
pwd
));
await
enterpriseInfo
.
save
();
return
{
isSuccess
:
true
};
}
// let todayMs = sysTools.getTodayMs();
// let codeList = await codeData.findTodayCodeByUscc(uscc, todayMs);
// let now = new Date().valueOf();
/**
* 发送修改密码的短信验证码
* @param uscc 企业统一信用代码
*/
export
async
function
changePwdSendCode
(
uscc
:
string
,
phone
:
string
)
{
if
(
!
sysTools
.
eccUscc
(
uscc
))
throw
new
BizError
(
ERRORENUM
.
统一社会信用代码不合法
,
'重置密码时'
);
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
if
(
!
enterpriseInfo
)
throw
new
BizError
(
ERRORENUM
.
账号不存在
,
`企业-发送验证码时 uscc:
${
uscc
}
`
);
if
(
!
enterpriseInfo
.
securePhon
)
throw
new
BizError
(
ERRORENUM
.
未填安全手机号无法修改密码
,
'企业-修改密码发验证码时-没有安全手机号'
);
if
(
phone
!=
enterpriseInfo
.
securePhon
)
throw
new
BizError
(
ERRORENUM
.
号码与主体不一致
,
'企业-修改密码发验证码时'
);
// let codeId = '';
// let msg = ERRORENUM.验证码错误;
// codeList.forEach(info => {
// if (info.code == code) {
// if (info.isUse) msg = ERRORENUM.验证码失效;
// else if ( (now - info.sendMs) > (30 * 60 * 1000) ) msg = ERRORENUM.验证码过期
// else codeId = info.id;
// }
// });
let
todayMs
=
sysTools
.
getTodayMs
();
let
todayCodeList
=
await
codeData
.
findTodayCodeByUscc
(
uscc
,
todayMs
);
if
(
todayCodeList
.
length
>=
4
)
throw
new
BizError
(
ERRORENUM
.
发送验证码次数超限制
,
`
${
uscc
}
修改密码发送验证码次数超限制4`
);
// if (!codeId) throw new BizError(msg, `uscc:${uscc}重置密码的code:${code}`);
let
sendMs
=
todayMs
;
todayCodeList
.
forEach
(
info
=>
{
sendMs
=
Math
.
max
(
sendMs
,
info
.
sendMs
);
});
// await codeData.updateCodeState(codeId);
let
now
=
new
Date
().
valueOf
();
if
((
now
-
sendMs
)
<=
(
60
*
1000
)
)
throw
new
BizError
(
ERRORENUM
.
发送验证码频率过快
,
`
${
uscc
}
`
);
// fuHuaQiInfo.pwd = sysTools.getPwdMd5(uscc, sysTools.md5PwdStr(pwd));
let
codeId
=
sysTools
.
getSMSCodeId
(
uscc
,
todayCodeList
.
length
);
let
code
=
sysTools
.
getSMSCode
();
// await fuHuaQiInfo.save();
await
sendChangePwdCode
(
phone
,
code
);
now
=
new
Date
().
valueOf
();
await
codeData
.
createCode
(
uscc
,
codeId
,
code
,
CODETYPE
.
修改密码
,
now
);
return
{
isSuccess
:
true
,
sendMs
:
now
};
}
export
async
function
getFirstUpdatePwdState
(
uscc
:
string
)
{
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
// return {isSuccess:true
};
return
{
firstLogin
:
!
enterpriseInfo
.
firstLoginIsChangePwd
,
};
}
\ No newline at end of file
src/biz/mobileFuHuaQi/enterprise/myEnterprise.ts
View file @
23b1b9f7
...
...
@@ -152,9 +152,9 @@ export async function updatePhysicalInfo(fuHuaQiUscc:string, uscc:string, leased
if
(
changeState
)
{
/**企业状态改变埋点 */
let
xn
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
,
draftLock
:
true
})
||
0
;
//虚拟孵化
let
st
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
,
draftLock
:
true
})
||
0
;
//实体孵化
let
qc
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
迁出
,
draftLock
:
true
})
||
0
;
//迁出孵化
let
xn
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
})
||
0
;
//虚拟孵化
let
st
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
})
||
0
;
//实体孵化
let
qc
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
迁出
})
||
0
;
//迁出孵化
addPoint
(
POINTTYPEENUM
.
孵化器
,
fuHuaQiUscc
,
FUHUAQINODEENUM
.
企业状态变化
,
{
xn
,
st
,
qc
},
{});
}
...
...
@@ -181,6 +181,11 @@ export async function updateVirtualInfo(fuHuaQiUscc:string, uscc:string, virtual
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
if
(
!
enterpriseInfo
)
throw
new
BizError
(
ERRORENUM
.
该企业不存在
,
"修改企业孵化状态 修改为实体"
,
`孵化器
${
fuHuaQiUscc
}
-> 企业
${
uscc
}
`
);
/**埋点 -新值 */
let
oldData
=
{
leasedArea
:
enterpriseInfo
.
leasedArea
||
0
,
state
:
enterpriseInfo
.
state
,
};
if
(
enterpriseInfo
.
fuHuaQiUscc
!=
fuHuaQiUscc
)
throw
new
BizError
(
ERRORENUM
.
无法操作其他孵化器的企业
,
"修改企业孵化状态 修改为实体"
,
`孵化器
${
fuHuaQiUscc
}
-> 企业
${
uscc
}
`
);
...
...
@@ -195,11 +200,7 @@ export async function updateVirtualInfo(fuHuaQiUscc:string, uscc:string, virtual
enterpriseInfo
.
leasedArea
=
0
;
//租赁面积
enterpriseInfo
.
moveOutTime
=
0
;
/**埋点 */
let
oldData
=
{
leasedArea
:
enterpriseInfo
.
leasedArea
||
0
,
state
:
enterpriseInfo
.
state
,
};
/**埋点 -新值 */
let
newData
=
{
leasedArea
:
0
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
,
...
...
@@ -210,9 +211,9 @@ export async function updateVirtualInfo(fuHuaQiUscc:string, uscc:string, virtual
await
enterpriseInfo
.
save
();
/**企业状态改变埋点 */
let
xn
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
,
draftLock
:
true
})
||
0
;
//虚拟孵化
let
st
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
,
draftLock
:
true
})
||
0
;
//实体孵化
let
qc
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
迁出
,
draftLock
:
true
})
||
0
;
//迁出孵化
let
xn
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
})
||
0
;
//虚拟孵化
let
st
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
})
||
0
;
//实体孵化
let
qc
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
迁出
})
||
0
;
//迁出孵化
addPoint
(
POINTTYPEENUM
.
孵化器
,
fuHuaQiUscc
,
FUHUAQINODEENUM
.
企业状态变化
,
{
xn
,
st
,
qc
},
{});
return
{
isUsccess
:
true
};
...
...
@@ -256,6 +257,14 @@ export async function updateMoveOutInfo(fuHuaQiUscc:string, uscc:string, moveOu
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
if
(
!
enterpriseInfo
)
throw
new
BizError
(
ERRORENUM
.
该企业不存在
,
"修改企业孵化状态 修改为实体"
,
`孵化器
${
fuHuaQiUscc
}
-> 企业
${
uscc
}
`
);
/**埋点 -旧值 */
let
oldData
=
{
leasedArea
:
enterpriseInfo
.
leasedArea
||
0
,
state
:
enterpriseInfo
.
state
,
virtualCause
:
null
,
//虚拟孵化模式
virtualCauseDes
:
""
,
//虚拟孵化原因
};
if
(
enterpriseInfo
.
fuHuaQiUscc
!=
fuHuaQiUscc
)
throw
new
BizError
(
ERRORENUM
.
无法操作其他孵化器的企业
,
"修改企业孵化状态 修改为实体"
,
`孵化器
${
fuHuaQiUscc
}
-> 企业
${
uscc
}
`
);
enterpriseInfo
.
moveOutType
=
moveOutType
;
...
...
@@ -270,13 +279,7 @@ export async function updateMoveOutInfo(fuHuaQiUscc:string, uscc:string, moveOu
enterpriseInfo
.
virtualCauseDes
=
""
;
//虚拟孵化原因
enterpriseInfo
.
leasedArea
=
0
;
//租赁面积
/**埋点 */
let
oldData
=
{
leasedArea
:
enterpriseInfo
.
leasedArea
||
0
,
state
:
enterpriseInfo
.
state
,
virtualCause
:
null
,
//虚拟孵化模式
virtualCauseDes
:
""
,
//虚拟孵化原因
};
/**埋点 -新值*/
let
newData
=
{
leasedArea
:
0
,
state
:
configEnum
.
FUHUASTATE
.
迁出
,
...
...
@@ -284,15 +287,17 @@ export async function updateMoveOutInfo(fuHuaQiUscc:string, uscc:string, moveOu
moveOutCause
:
moveOutCause
,
moveOutTrace
:
moveOutTrace
,
moveOutTime
:
new
Date
().
valueOf
(),
graduation
:
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
graduation
:
true
})
};
addPoint
(
POINTTYPEENUM
.
孵化器
,
fuHuaQiUscc
,
FUHUAQINODEENUM
.
我的企业
_
孵化状态
,
oldData
,
newData
);
await
enterpriseInfo
.
save
();
/**企业状态改变埋点 */
let
xn
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
,
draftLock
:
true
})
||
0
;
//虚拟孵化
let
st
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
,
draftLock
:
true
})
||
0
;
//实体孵化
let
qc
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
:
uscc
,
state
:
configEnum
.
FUHUASTATE
.
迁出
,
draftLock
:
true
})
||
0
;
//迁出孵化
let
xn
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
})
||
0
;
//虚拟孵化
let
st
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
})
||
0
;
//实体孵化
let
qc
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
迁出
})
||
0
;
//迁出孵化
addPoint
(
POINTTYPEENUM
.
孵化器
,
fuHuaQiUscc
,
FUHUAQINODEENUM
.
企业状态变化
,
{
xn
,
st
,
qc
},
{});
return
{
isUsccess
:
true
};
...
...
@@ -404,9 +409,9 @@ export async function replenishMyEnterpriseInPutInfo(fuHuaQiUscc:string, param)
addPoint
(
POINTTYPEENUM
.
孵化器
,
fuHuaQiUscc
,
FUHUAQINODEENUM
.
我的企业
_
补录企业
,
param
.
uscc
,
'新迁入'
);
/**企业状态改变埋点 */
let
xn
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
,
draftLock
:
true
})
||
0
;
//虚拟孵化
let
st
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
,
draftLock
:
true
})
||
0
;
//实体孵化
let
qc
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
迁出
,
draftLock
:
true
})
||
0
;
//迁出孵化
let
xn
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
虚拟孵化
})
||
0
;
//虚拟孵化
let
st
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
实体孵化
})
||
0
;
//实体孵化
let
qc
=
await
enterpriseData
.
findEnterpriseCount
({
fuHuaQiUscc
,
state
:
configEnum
.
FUHUASTATE
.
迁出
})
||
0
;
//迁出孵化
addPoint
(
POINTTYPEENUM
.
孵化器
,
fuHuaQiUscc
,
FUHUAQINODEENUM
.
企业状态变化
,
{
xn
,
st
,
qc
},
{});
return
{
isSuccess
:
true
};
...
...
src/biz/mobileFuHuaQi/fuHuaQi/user.ts
View file @
23b1b9f7
...
...
@@ -326,4 +326,16 @@ export async function resettingPwd(phone:string, uscc:string, code:string, pwd:s
await
fuHuaQiInfo
.
save
();
return
{
isSuccess
:
true
};
}
/**
* 获取孵化器首次登录状态
* @param uscc
* @returns
*/
export
async
function
getFirstUpdatePwdState
(
uscc
:
string
)
{
let
fuHuaQiInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
return
{
firstLogin
:
!
fuHuaQiInfo
.
firstLoginIsChangePwd
};
}
\ No newline at end of file
src/biz/point.ts
View file @
23b1b9f7
...
...
@@ -103,10 +103,10 @@ export async function getPointDataByParam(type:number, pointId:number, param) {
let
url
=
'http://localhost:7078/point/query'
;
let
result
:
any
=
await
post
(
url
,
{
type
,
pointId
,
param
},
{
sign
:
Sign
});
if
(
!
result
.
success
||
result
.
co
untDocuments
!=
200
)
{
if
(
!
result
.
success
||
result
.
co
de
!=
200
)
{
logError
(
url
,
"请求失败"
,
JSON
.
stringify
(
result
)
);
console
.
log
(
url
,
"请求失败"
,
JSON
.
stringify
(
result
));
return
[];
}
return
result
.
data
||
[];
return
result
.
data
.
dataList
||
[];
}
\ No newline at end of file
src/config/errorEnum.ts
View file @
23b1b9f7
...
...
@@ -70,7 +70,8 @@ export enum ERRORENUM {
系统错误请联系管理员
,
企业审批中请下个自然月登录
,
缺少关键参数导致修改失败
,
不合规操作
不合规操作
,
未填安全手机号无法修改密码
}
export
enum
ERRORCODEENUM
{
...
...
src/config/splitResultConfig.ts
View file @
23b1b9f7
...
...
@@ -121,7 +121,9 @@ export const EnterpriseListConfig = {
state
:{
key
:
"孵化状态"
},
virtualCause
:{
key
:
"虚拟孵化模式"
},
intellectualProperty
:{
key
:
"知识产权"
},
qualification
:{
key
:
"企业资质"
}
qualification
:{
key
:
"企业资质"
},
cycxfx
:{
key
:
"创业创新方向"
},
cycsrbj
:{
key
:
"创业创始人背景"
}
};
...
...
@@ -142,15 +144,18 @@ export const EnterpriseMoveOutListConfig = {
mainBusiness
:{
key
:
"主营业务"
},
//主营业务
logonTime
:{
key
:
"注册时间"
,
changeDate
:
true
},
timeOfImmigration
:{
key
:
"迁入时间"
,
changeDate
:
true
},
oldLogonAdd
:{
key
:
"迁入前注册地址"
},
oldLogonAdd
ress
:{
key
:
"迁入前注册地址"
},
firstIncubationTime
:{
key
:
"首次入孵时间"
,
changeDate
:
true
},
isNaturalPersonHolding
:{
key
:
"是否自然人控股"
},
logonAdd
:{
key
:
"注册地址"
},
operatingAdd
:{
key
:
"经营地址"
},
logonAdd
ress
:{
key
:
"注册地址"
},
operatingAdd
ress
:{
key
:
"经营地址"
},
leasedArea
:{
key
:
"租赁面积(平方米)"
},
};
/**
* 使用端: 管理后台
* 场景: 企业融资信息列表
...
...
src/data/enterprise/enterprise.ts
View file @
23b1b9f7
...
...
@@ -51,9 +51,9 @@ const enterpriseSchema = new Schema({
firstIncubationTime
:
Number
,
//首次入孵时间
timeOfImmigration
:
Number
,
//迁入时间
isNaturalPersonHolding
:{
type
:
Boolean
,
default
:
true
},
//是否自然人控股企业
oldLogonAdd
:
String
,
//迁入前注册地址
logonAdd
:
String
,
//注册地址
operatingAdd
:
String
,
//经营地址
oldLogonAdd
:
String
,
//迁入前注册地址
弃用
logonAdd
:
String
,
//注册地址
弃用
operatingAdd
:
String
,
//经营地址
弃用
isCreate
:{
type
:
Boolean
,
default
:
false
},
//是否新建
// isPhysicalPresence:{type:Boolean, default:true},//是否实地孵化 暂时弃用
leasedArea
:
Number
,
//租赁面积(平方米)
...
...
src/data/enterprise/financingInfo.ts
View file @
23b1b9f7
...
...
@@ -19,6 +19,7 @@ const financingSchema = new Schema({
fuHuaQiInvestmentStyle
:
Number
,
//孵化器投资方式
createTime
:
Number
,
//录入时间
type
:{
type
:
Number
,
default
:
1
},
//1为 孵化器 2为企业自己添加 3为孵化器添加企业修改
});
var
financingInfoModel
;
...
...
@@ -106,7 +107,7 @@ export async function selectEnterpriseTwoYeasFinancing(uscc:string, startTime:nu
export
async
function
statsEnterpriseFinancing
()
{
let
statsList
=
await
financingInfoModel
.
aggregate
([
{
"$group"
:{
_id
:
"$financingRounds"
,
count
:{
"$sum"
:
"$financingAmount"
}
}}
{
"$group"
:{
_id
:
"$financingRounds"
,
count
:{
"$sum"
:
1
}
}}
]);
return
statsList
;
}
...
...
src/data/enterprise/quarterTask/team.ts
View file @
23b1b9f7
...
...
@@ -109,7 +109,7 @@ export async function addManyTeamData(addList) {
export
async
function
statsEnterpriseTeamData
(
year
:
number
,
quarter
:
number
)
{
let
statsList
=
await
teamModel
.
aggregate
([
{
"$match"
:{
year
,
quarter
,
draftLock
:
true
}},
{
"$match"
:{
year
,
quarter
,
"$or"
:[{
isSubmit
:
true
},
{
fhqIsSubmit
:
true
}]
}},
{
"$group"
:{
_id
:
"stats"
,
doctorCount
:{
"$sum"
:
"$doctor"
},
...
...
@@ -124,7 +124,7 @@ export async function statsEnterpriseTeamData(year:number, quarter:number) {
export
async
function
statsEnterTeamDataByFHQ
(
year
:
number
,
quarter
:
number
)
{
let
statsList
=
await
teamModel
.
aggregate
([
{
"$match"
:{
year
,
quarter
,
draftLock
:
true
}},
{
"$match"
:{
year
,
quarter
,
"$or"
:[{
isSubmit
:
true
},
{
fhqIsSubmit
:
true
}]
}},
{
"$group"
:{
_id
:
"$fuHuaQiUscc"
,
doctorCount
:{
"$sum"
:
"$doctor"
},
...
...
@@ -144,7 +144,7 @@ export async function statsEnterTeamDataByFHQ(year:number, quarter:number) {
export
async
function
statsEnterpriseTeamCountByNull
(
year
:
number
,
quarter
:
number
)
{
let
statsList
=
await
teamModel
.
aggregate
([
{
"$match"
:{
year
,
quarter
,
draftLock
:
true
}},
{
"$match"
:{
year
,
quarter
,
"$or"
:[{
isSubmit
:
true
},
{
fhqIsSubmit
:
true
}]
}},
{
"$project"
:{
name
:
1
,
count
:[
"$doctor"
,
"$master"
,
"$undergraduate"
,
"$juniorCollege"
,
"$other"
]
}},
...
...
src/data/fuHuaQi/monthTask/financing.ts
View file @
23b1b9f7
...
...
@@ -89,8 +89,8 @@ export async function updateFinancingDraftLock(taskId:string) {
* @param taskId 任务id 格式遵循tool中getTaskId
* @param param 所添加表单 需要提前验证
*/
export
async
function
createFinancing
(
fuHuaQiUscc
:
string
,
taskId
:
string
,
uscc
:
string
,
logonTime
:
number
,
industry
,
param
)
{
let
addInfo
=
Object
.
assign
({
fuHuaQiUscc
,
taskId
,
uscc
,
logonTime
,
createTime
:
new
Date
().
valueOf
()},
param
);
export
async
function
createFinancing
(
fuHuaQiUscc
:
string
,
taskId
:
string
,
uscc
:
string
,
logonTime
:
number
,
industry
,
param
)
{
let
addInfo
=
Object
.
assign
({
fuHuaQiUscc
,
industry
,
taskId
,
uscc
,
logonTime
,
createTime
:
new
Date
().
valueOf
()},
param
);
if
(
logonTime
)
addInfo
.
logonTime
=
logonTime
;
await
financingModel
.
create
(
addInfo
);
}
...
...
@@ -133,4 +133,4 @@ export async function deleteEnterpriseFinancing(uscc:string, taskId:string) {
*/
export
async
function
findFinancingList
(
selectParam
:
object
)
{
return
await
financingModel
.
find
(
selectParam
);
}
\ No newline at end of file
}
src/data/fuHuaQi/monthTask/task.ts
View file @
23b1b9f7
...
...
@@ -143,7 +143,7 @@ export async function updateSubmitCount(taskId:string, type:number, count:number
*/
export
async
function
statsFuHuaQiTaskReportingRate
(
year
:
number
,
month
:
number
)
{
let
statsList
=
await
fuHuaQiTaskModel
.
aggregate
([
{
"$match"
:{
year
,
month
,
isSubmit
:
true
}},
{
"$match"
:{
year
,
month
}},
{
"$group"
:{
_id
:{
uid
:
"$fuHuaQiUscc"
,
isSubmit
:
"$isSubmit"
},
count
:{
"$sum"
:
1
}
}
}
]);
...
...
src/routers/enterpriseMobileClient/user.ts
View file @
23b1b9f7
...
...
@@ -10,6 +10,9 @@ import { checkEnterpriseToken } from '../../middleware/user';
export
function
setRouter
(
httpServer
)
{
httpServer
.
post
(
'/enterprise/login'
,
asyncHandler
(
login
));
httpServer
.
post
(
'/enterprise/user/firstchangepwd'
,
checkEnterpriseToken
,
asyncHandler
(
firstLoginChangeEnterprisePwd
));
httpServer
.
post
(
'/enterprise/changepwd/resetting'
,
asyncHandler
(
resettingEnterprisePwd
));
httpServer
.
post
(
'/enterprise/changepwd/sendcode'
,
asyncHandler
(
changeEnterprisePwdSendCode
));
httpServer
.
post
(
'/enterprise/user/firstupdatepwdstate'
,
checkEnterpriseToken
,
asyncHandler
(
firstUpdatePwdState
));
}
...
...
@@ -45,3 +48,48 @@ async function firstLoginChangeEnterprisePwd(req, res) {
}
/**
* 重置密码
* @param req
* @param res
*/
async
function
resettingEnterprisePwd
(
req
,
res
)
{
let
reqConf
=
{
phone
:
"String"
,
uscc
:
"String"
,
code
:
"String"
,
pwd
:
"String"
,
confirmPwd
:
"String"
};
let
{
phone
,
uscc
,
code
,
pwd
,
confirmPwd
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
result
=
await
userBiz
.
resettingPwd
(
phone
,
uscc
,
code
,
pwd
,
confirmPwd
);
res
.
success
(
result
);
}
/**
* 重置密码发验证码
* @param req
* @param res
*/
async
function
changeEnterprisePwdSendCode
(
req
,
res
)
{
let
reqConf
=
{
uscc
:
'String'
,
phone
:
'String'
};
let
{
uscc
,
phone
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
let
result
=
await
userBiz
.
changePwdSendCode
(
uscc
,
phone
);
res
.
success
(
result
);
}
/**
* 获取孵化器首次登录状态
* @param uscc
* @returns
*/
export
async
function
firstUpdatePwdState
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
userBiz
.
getFirstUpdatePwdState
(
Uscc
);
res
.
success
(
result
);
}
\ No newline at end of file
src/routers/mobileClient/user.ts
View file @
23b1b9f7
...
...
@@ -16,6 +16,7 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/fuhuaqi/bindlist'
,
checkFuHuaQiToken
,
asyncHandler
(
bindList
));
httpServer
.
post
(
'/fuhuaqi/changeuser'
,
checkFuHuaQiToken
,
asyncHandler
(
changeUser
));
httpServer
.
post
(
'/fuhuaqi/forgotpwd'
,
asyncHandler
(
forgotPwd
));
httpServer
.
post
(
'/fuhuaqi/user/firstupdatepwdstate'
,
checkFuHuaQiToken
,
asyncHandler
(
firstUpdatePwdState
));
/**发送短信验证码 */
httpServer
.
post
(
'/fuhuaqi/changepwd/sendcode'
,
asyncHandler
(
sendCode
));
}
...
...
@@ -148,7 +149,6 @@ async function bindList(req, res) {
* @param res
*/
async
function
changeUser
(
req
,
res
)
{
let
reqConf
=
{
targetUscc
:
'String'
};
let
{
targetUscc
}
=
eccReqParamater
(
reqConf
,
req
.
body
);
...
...
@@ -158,3 +158,16 @@ async function changeUser(req, res) {
res
.
success
(
result
);
}
/**
* 获取孵化器首次登录状态
* @param req
* @param res
*/
async
function
firstUpdatePwdState
(
req
,
res
)
{
const
Uscc
=
req
.
headers
.
uscc
;
let
result
=
await
userBiz
.
getFirstUpdatePwdState
(
Uscc
);
res
.
success
(
result
);
}
\ No newline at end of file
src/routers/provide.ts
View file @
23b1b9f7
...
...
@@ -25,6 +25,9 @@ export function setRouter(httpServer) {
/**3.2 */
httpServer
.
post
(
'/admin/provide/enterprise/initpwd'
,
checkInterior
,
asyncHandler
(
updateEnterprisePwd
)
);
/**4.2 */
httpServer
.
post
(
'/admin/provide/enterprise/financing/industry'
,
checkInterior
,
asyncHandler
(
addFinancingIndustry
)
);
}
...
...
@@ -106,4 +109,9 @@ async function enterpriseInfo(req, res) {
async
function
updateEnterprisePwd
(
req
,
res
)
{
await
provideBiz
.
initEnterprisePwd
();
res
.
success
({
isUsccess
:
true
});
}
async
function
addFinancingIndustry
(
req
,
res
)
{
await
provideBiz
.
addFinancingIndustry
();
res
.
success
({
isUsccess
:
true
});
}
\ No newline at end of file
src/tools/system.ts
View file @
23b1b9f7
...
...
@@ -184,4 +184,4 @@ export function changeAddToString(address) {
str
+=
item
;
});
return
str
;
}
\ 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