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
e5651c63
Commit
e5651c63
authored
Mar 30, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.1
parent
4230f8ba
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
324 additions
and
48 deletions
+324
-48
provide.ts
src/biz/admin/provide.ts
+109
-2
financing.ts
src/biz/mobileFuHuaQi/enterprise/financing.ts
+2
-2
base.ts
src/biz/mobileFuHuaQi/fuHuaQi/base.ts
+9
-1
eccFormParamConfig.ts
src/config/eccFormParamConfig.ts
+28
-23
enum.ts
src/config/enum.ts
+27
-0
errorEnum.ts
src/config/errorEnum.ts
+2
-1
splitResultConfig.ts
src/config/splitResultConfig.ts
+15
-10
enterprise.ts
src/data/enterprise/enterprise.ts
+14
-1
financing.ts
src/data/enterprise/financing.ts
+4
-0
fuhuaqi.ts
src/data/fuHuaQi/fuhuaqi.ts
+12
-3
main.ts
src/main.ts
+3
-0
provide.ts
src/routers/provide.ts
+9
-0
public.ts
src/routers/public.ts
+21
-3
system.ts
src/tools/system.ts
+3
-2
verificationParam.ts
src/util/verificationParam.ts
+66
-0
No files found.
src/biz/admin/provide.ts
View file @
e5651c63
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
import
*
as
monthTableData
from
"../../data/fuHuaQi/monthTable"
;
import
*
as
monthTableData
from
"../../data/fuHuaQi/monthTable"
;
import
*
as
taskData
from
"../../data/fuHuaQi/task"
;
import
*
as
taskData
from
"../../data/fuHuaQi/task"
;
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
*
as
fuhuaqiData
from
"../../data/fuHuaQi/fuhuaqi"
;
import
*
as
financingData
from
"../../data/enterprise/financing"
;
import
{
FUHUASTATE
,
SCOREWAYS
,
TASKTYPEENUM
}
from
"../../config/enum"
;
import
{
FUHUASTATE
,
SCOREWAYS
,
TASKTYPEENUM
}
from
"../../config/enum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
findAllNotDisabledFuHuaQi
,
findFuHuaQiList
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
findAllNotDisabledFuHuaQi
,
findFuHuaQiList
}
from
"../../data/fuHuaQi/fuhuaqi"
;
...
@@ -10,7 +12,6 @@ import { BizError } from "../../util/bizError";
...
@@ -10,7 +12,6 @@ import { BizError } from "../../util/bizError";
import
{
logHandle
}
from
"../../util/log"
;
import
{
logHandle
}
from
"../../util/log"
;
import
{
initFuHuaQiScore
}
from
"../../data/fuHuaQi/score"
;
import
{
initFuHuaQiScore
}
from
"../../data/fuHuaQi/score"
;
import
{
updateScore
}
from
"../mobileFuHuaQi/fuHuaQi/score"
;
import
{
updateScore
}
from
"../mobileFuHuaQi/fuHuaQi/score"
;
import
{
findFinancingList
}
from
"../../data/enterprise/financing"
;
...
@@ -119,7 +120,7 @@ export async function replenishTaskData() {
...
@@ -119,7 +120,7 @@ export async function replenishTaskData() {
}
}
let
fList
=
await
findFinancingList
({});
let
fList
=
await
fin
ancingData
.
fin
dFinancingList
({});
let
fTaskMap
=
{};
let
fTaskMap
=
{};
fList
.
forEach
(
info
=>
{
fList
.
forEach
(
info
=>
{
...
@@ -137,4 +138,109 @@ export async function replenishTaskData() {
...
@@ -137,4 +138,109 @@ export async function replenishTaskData() {
}
}
console
.
log
(
"初始化任务提交数成功"
);
console
.
log
(
"初始化任务提交数成功"
);
}
/**
* 2.1
*/
export
async
function
updateAdd
()
{
/**查找所有孵化器 */
let
fhqList
=
await
fuhuaqiData
.
findFuHuaQiList
({});
let
updateList
=
[];
//需要修改的地址
fhqList
.
forEach
(
info
=>
{
if
(
info
.
hatchingGround
&&
info
.
hatchingGround
.
length
)
{
updateList
.
push
({
uscc
:
info
.
uscc
,
hatchingGround
:
info
.
hatchingGround
});
}
});
for
(
let
i
=
0
;
i
<
updateList
.
length
;
i
++
)
{
let
{
uscc
,
hatchingGround
}
=
updateList
[
i
];
hatchingGround
.
forEach
(
info
=>
{
info
.
personInChargeAddress
=
getNewAdd
(
info
.
personInChargeAdd
);
});
let
fuhuaqiItem
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
fuhuaqiItem
.
hatchingGround
=
hatchingGround
;
await
fuhuaqiItem
.
save
();
}
console
.
log
(
"孵化器 地址同步成功"
);
/** 修改企业信息 */
let
enterpriseList
=
await
enterpriseData
.
findEnterpriseList
({});
for
(
let
i
=
0
;
i
<
enterpriseList
.
length
;
i
++
)
{
let
{
uscc
,
oldLogonAdd
,
logonAdd
,
operatingAdd
}
=
enterpriseList
[
i
];
let
logonAddress
=
getNewAdd
(
logonAdd
);
let
operatingAddress
=
getNewAdd
(
operatingAdd
);
let
oldLogonAddress
=
getNewAdd
(
oldLogonAdd
);
let
item
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
item
.
logonAddress
=
logonAddress
;
item
.
operatingAddress
=
operatingAddress
;
item
.
oldLogonAddress
=
oldLogonAddress
;
await
item
.
save
();
}
/** 修改融资企业信息 */
let
financingList
=
await
financingData
.
findFinancingList
({});
for
(
let
i
=
0
;
i
<
financingList
.
length
;
i
++
)
{
let
{
uscc
,
taskId
,
logonAdd
,
operatingAdd
}
=
financingList
[
i
];
let
logonAddress
=
getNewAdd
(
logonAdd
);
let
operatingAddress
=
getNewAdd
(
operatingAdd
);
let
item
=
await
financingData
.
findFinancingInfoByTaskIdAndSucc
(
taskId
,
uscc
);
item
.
logonAddress
=
logonAddress
;
item
.
operatingAddress
=
operatingAddress
;
await
item
.
save
();
}
console
.
log
(
"地址数据同步成功"
);
}
function
getNewAdd
(
addStr
:
string
)
{
if
(
!
addStr
)
return
[
""
,
""
,
""
,
""
];
let
cityStr
=
""
;
//市
let
tackageStr
=
addStr
;
if
(
tackageStr
.
indexOf
(
"中国(上海)"
)
!=
-
1
||
tackageStr
.
indexOf
(
"中国(上海)"
)
!=
-
1
)
{
tackageStr
=
tackageStr
.
replace
(
"中国(上海)"
,
""
);
tackageStr
=
tackageStr
.
replace
(
"中国(上海)"
,
""
);
cityStr
=
"上海市"
;
}
let
checkIndex
=
tackageStr
.
indexOf
(
"上海市"
);
if
(
checkIndex
!=
-
1
)
{
cityStr
=
"上海市"
;
tackageStr
=
tackageStr
.
replace
(
"上海市"
,
""
);
}
else
{
if
(
tackageStr
.
indexOf
(
"上海"
)
!=
-
1
)
{
cityStr
=
"上海市"
;
tackageStr
=
tackageStr
.
replace
(
"上海"
,
""
);
}
}
let
areaIndex
=
tackageStr
.
indexOf
(
"区"
);
let
areaStr
=
""
;
//区
if
(
areaIndex
!=
-
1
)
{
areaStr
=
tackageStr
.
slice
(
0
,
areaIndex
+
1
);
tackageStr
=
tackageStr
.
replace
(
areaStr
,
""
);
}
if
(
areaStr
==
"自由贸易试验区"
)
areaStr
=
"浦东新区"
;
let
detailedStr
=
tackageStr
;
//详细
return
[
"上海市"
,
cityStr
,
areaStr
,
detailedStr
];
}
}
\ No newline at end of file
src/biz/mobileFuHuaQi/enterprise/financing.ts
View file @
e5651c63
...
@@ -164,8 +164,8 @@ export async function getFuHuaQiEnterpriseForSelect(uscc:string) {
...
@@ -164,8 +164,8 @@ export async function getFuHuaQiEnterpriseForSelect(uscc:string) {
if
(
info
.
state
!=
configEnum
.
FUHUASTATE
.
迁出
)
{
if
(
info
.
state
!=
configEnum
.
FUHUASTATE
.
迁出
)
{
dataList
.
push
({
dataList
.
push
({
name
:
info
.
name
,
name
:
info
.
name
,
logonAdd
:
info
.
logonAdd
,
logonAdd
ress
:
info
.
logonAddress
,
operatingAdd
:
info
.
operatingAdd
operatingAdd
ress
:
info
.
operatingAddress
});
});
}
}
});
});
...
...
src/biz/mobileFuHuaQi/fuHuaQi/base.ts
View file @
e5651c63
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
*/
*/
import
*
as
eccFormParamConfig
from
"../../../config/eccFormParamConfig"
;
import
*
as
eccFormParamConfig
from
"../../../config/eccFormParamConfig"
;
import
{
findEnterpriseCount
,
findEnterpriseCountByFuHuaQiUscc
,
groupFindEnterpriseCount
}
from
"../../../data/enterprise/enterprise"
;
import
{
findEnterpriseCount
,
findEnterpriseCountByFuHuaQiUscc
,
findEnterpriseTotalByFuHuaQiUscc
,
groupFindEnterpriseCount
}
from
"../../../data/enterprise/enterprise"
;
import
*
as
fuhuaqiData
from
"../../../data/fuHuaQi/fuhuaqi"
;
import
*
as
fuhuaqiData
from
"../../../data/fuHuaQi/fuhuaqi"
;
import
*
as
splitResultConfig
from
"../../../config/splitResultConfig"
;
import
*
as
splitResultConfig
from
"../../../config/splitResultConfig"
;
import
*
as
configEnum
from
"../../../config/enum"
;
import
*
as
configEnum
from
"../../../config/enum"
;
...
@@ -60,6 +60,9 @@ export async function selectFuHuaQiBaseData(uscc:string) {
...
@@ -60,6 +60,9 @@ export async function selectFuHuaQiBaseData(uscc:string) {
data
.
numOfEntities
=
data
.
numOfEntities
>
0
?
data
.
numOfEntities
:
0
;
data
.
numOfEntities
=
data
.
numOfEntities
>
0
?
data
.
numOfEntities
:
0
;
data
.
virtualEnterpriseNum
=
virtualEnterpriseNum
;
data
.
virtualEnterpriseNum
=
virtualEnterpriseNum
;
data
.
fuHuaEnterpriseTotal
=
dataBaseInfo
.
fuHuaEnterpriseTotal
?
dataBaseInfo
.
fuHuaEnterpriseTotal
:
0
;
data
.
fuHuaEnterpriseTotal
+=
await
findEnterpriseTotalByFuHuaQiUscc
(
uscc
);
return
data
;
return
data
;
}
}
...
@@ -96,6 +99,11 @@ export async function updateFuHuaQiBaseData(uscc:string, param) {
...
@@ -96,6 +99,11 @@ export async function updateFuHuaQiBaseData(uscc:string, param) {
eccFormParam
(
"更新孵化器基础数据 经备案孵化场地"
,
eccFormParamConfig
.
BaseParamUpdateHatchingGroundConfig
,
hatchingGroundInfo
);
eccFormParam
(
"更新孵化器基础数据 经备案孵化场地"
,
eccFormParamConfig
.
BaseParamUpdateHatchingGroundConfig
,
hatchingGroundInfo
);
});
});
}
}
if
(
param
.
isProfessionalTechnology
)
{
if
(
!
param
.
professionalTechnologyName
)
throw
new
BizError
(
ERRORENUM
.
参数错误
,
"修改孵化器=>我的数据信息"
,
"缺少professionalTechnologyName"
);
if
(
!
param
.
professionalTechnologyCreateTime
)
throw
new
BizError
(
ERRORENUM
.
参数错误
,
"修改孵化器=>我的数据信息"
,
"professionalTechnologyCreateTime"
);
if
(
!
param
.
professionalTechnologyAmount
)
throw
new
BizError
(
ERRORENUM
.
参数错误
,
"修改孵化器=>我的数据信息"
,
"professionalTechnologyAmount"
);
}
let
baseDataInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
let
baseDataInfo
=
await
fuhuaqiData
.
findFuHuaQiByUSCC
(
uscc
);
/**这里无法判断数组里面的内容是否有变化 所以 hatchingGround 直接赋值 */
/**这里无法判断数组里面的内容是否有变化 所以 hatchingGround 直接赋值 */
...
...
src/config/eccFormParamConfig.ts
View file @
e5651c63
...
@@ -13,11 +13,15 @@
...
@@ -13,11 +13,15 @@
* 备注:
* 备注:
*/
*/
export
const
BaseParamUpdateConfig
=
{
export
const
BaseParamUpdateConfig
=
{
virtualEnterpriseNum
:{
type
:
"Number"
},
//虚拟企业数量
virtualEnterpriseNum
:{
type
:
"Number"
,
notMustHave
:
true
},
//虚拟企业数量
incubatedAcreage
:{
type
:
"Number"
,
notMustHave
:
true
},
//在孵面积(㎡)
incubatedAcreage
:{
type
:
"Number"
,
notMustHave
:
true
},
//在孵面积(㎡)
acreageTotal
:{
type
:
"Number"
,
notMustHave
:
true
},
//孵化器总面积(㎡)
acreageTotal
:{
type
:
"Number"
,
notMustHave
:
true
},
//孵化器总面积(㎡)
acreagePersonalUse
:{
type
:
"Number"
,
notMustHave
:
true
},
//孵化器自用面积(㎡)
acreagePersonalUse
:{
type
:
"Number"
,
notMustHave
:
true
},
//孵化器自用面积(㎡)
hatchingGround
:{
type
:
"[Object]"
,
notMustHave
:
true
},
//经备案孵化场地
hatchingGround
:{
type
:
"[Object]"
,
notMustHave
:
true
},
//经备案孵化场地
isProfessionalTechnology
:{
type
:
"Boolean"
,
notMustHave
:
true
},
//是否专业技术平台
professionalTechnologyName
:{
type
:
"String"
,
notMustHave
:
true
},
//专业技术平台名称
professionalTechnologyCreateTime
:{
type
:
"Number"
,
notMustHave
:
true
},
//时间 年份 xxxx年01月01日 的时间戳
professionalTechnologyAmount
:{
type
:
"Number"
,
notMustHave
:
true
},
//投资金额 万元
};
};
/**
/**
* 使用端: 小程序端【孵化器入口】
* 使用端: 小程序端【孵化器入口】
...
@@ -25,7 +29,8 @@ export const BaseParamUpdateConfig = {
...
@@ -25,7 +29,8 @@ export const BaseParamUpdateConfig = {
* 备注: 当填了案孵化场地数据 验证经备案孵化场地
* 备注: 当填了案孵化场地数据 验证经备案孵化场地
*/
*/
export
const
BaseParamUpdateHatchingGroundConfig
=
{
export
const
BaseParamUpdateHatchingGroundConfig
=
{
personInChargeAdd
:{
type
:
"String"
},
//孵化场地地址
// personInChargeAdd:{type:"String"},//孵化场地地址 2.1舍弃 修改为 personInChargeAddress
personInChargeAddress
:{
type
:
"Address"
},
//孵化场地地址
siteAcreage
:{
type
:
"Number"
},
//孵化场地面积(㎡)
siteAcreage
:{
type
:
"Number"
},
//孵化场地面积(㎡)
leasePrice
:{
type
:
"Number"
},
//孵化场地出租单价
leasePrice
:{
type
:
"Number"
},
//孵化场地出租单价
};
};
...
@@ -82,8 +87,8 @@ export const EnterpriseParamFormConfig = {
...
@@ -82,8 +87,8 @@ export const EnterpriseParamFormConfig = {
logonTime
:
"Number"
,
//注册时间
logonTime
:
"Number"
,
//注册时间
firstIncubationTime
:
"Number"
,
//首次入孵时间
firstIncubationTime
:
"Number"
,
//首次入孵时间
isNaturalPersonHolding
:
"Boolean"
,
//是否自然人控股企业
isNaturalPersonHolding
:
"Boolean"
,
//是否自然人控股企业
logonAdd
:
"String"
,
//注册地址
logonAdd
ress
:
"Address"
,
//注册地址 2.1修改
operatingAdd
:
"String"
,
//经营地址
operatingAdd
ress
:
"Address"
,
//经营地址 2.1修改
leasedArea
:
"Number"
,
//租赁面积(平方米)
leasedArea
:
"Number"
,
//租赁面积(平方米)
mainBusiness
:
"String"
,
//主营业务
mainBusiness
:
"String"
,
//主营业务
draftId
:
"String"
,
//草稿id
draftId
:
"String"
,
//草稿id
...
@@ -102,10 +107,10 @@ export const EnterpriseInPutParamFormConfig = {
...
@@ -102,10 +107,10 @@ export const EnterpriseInPutParamFormConfig = {
logonTime
:
"Number"
,
//注册时间
logonTime
:
"Number"
,
//注册时间
firstIncubationTime
:
"Number"
,
//首次入孵时间
firstIncubationTime
:
"Number"
,
//首次入孵时间
isNaturalPersonHolding
:
"Boolean"
,
//是否自然人控股企业
isNaturalPersonHolding
:
"Boolean"
,
//是否自然人控股企业
logonAdd
:
"String"
,
//注册地址
logonAdd
ress
:
"Address"
,
//注册地址 2.1修改
operatingAdd
:
"String"
,
//经营地址
operatingAdd
ress
:
"Address"
,
//经营地址 2.1修改
leasedArea
:
"Number"
,
//租赁面积(平方米)
leasedArea
:
"Number"
,
//租赁面积(平方米)
oldLogonAdd
:
"String"
,
//迁入前注册地址
oldLogonAdd
ress
:
"Address"
,
//迁入前注册地址 2.1修改
timeOfImmigration
:
"Number"
,
//迁入时间
timeOfImmigration
:
"Number"
,
//迁入时间
mainBusiness
:
"String"
,
//主营业务
mainBusiness
:
"String"
,
//主营业务
draftId
:
"String"
,
//草稿id
draftId
:
"String"
,
//草稿id
...
@@ -124,8 +129,8 @@ export const RegisterEnterpriseParamConfig = {
...
@@ -124,8 +129,8 @@ export const RegisterEnterpriseParamConfig = {
logonTime
:{
type
:
"Number"
},
//注册时间
logonTime
:{
type
:
"Number"
},
//注册时间
firstIncubationTime
:{
type
:
"Number"
},
//首次入孵时间
firstIncubationTime
:{
type
:
"Number"
},
//首次入孵时间
isNaturalPersonHolding
:{
type
:
"Boolean"
},
//是否自然人控股企业
isNaturalPersonHolding
:{
type
:
"Boolean"
},
//是否自然人控股企业
logonAdd
:{
type
:
"String"
},
//注册地址
logonAdd
ress
:{
type
:
"Address"
},
//注册地址 2.1修改
operatingAdd
:{
type
:
"String"
},
//经营地址
operatingAdd
ress
:{
type
:
"Address"
},
//经营地址 2.1修改
leasedArea
:{
type
:
"Number"
},
//租赁面积(平方米)
leasedArea
:{
type
:
"Number"
},
//租赁面积(平方米)
mainBusiness
:{
type
:
"String"
},
//主营业务
mainBusiness
:{
type
:
"String"
},
//主营业务
};
};
...
@@ -144,9 +149,9 @@ export const MoveInEnterpriseParamConfig = {
...
@@ -144,9 +149,9 @@ export const MoveInEnterpriseParamConfig = {
firstIncubationTime
:
"Number"
,
//首次入孵时间
firstIncubationTime
:
"Number"
,
//首次入孵时间
timeOfImmigration
:
"Number"
,
//迁入时间
timeOfImmigration
:
"Number"
,
//迁入时间
isNaturalPersonHolding
:
"Boolean"
,
//是否自然人控股企业
isNaturalPersonHolding
:
"Boolean"
,
//是否自然人控股企业
oldLogonAdd
:
"String"
,
//迁入前注册地址
oldLogonAdd
ress
:
"Address"
,
//迁入前注册地址 2.1修改
logonAdd
:
"String"
,
//注册地址
logonAdd
ress
:
"Address"
,
//注册地址 2.1修改
operatingAdd
:
"String"
,
//经营地址
operatingAdd
ress
:
"Address"
,
//经营地址 2.1修改
leasedArea
:
"Number"
,
//租赁面积(平方米)
leasedArea
:
"Number"
,
//租赁面积(平方米)
mainBusiness
:
"String"
,
//主营业务
mainBusiness
:
"String"
,
//主营业务
};
};
...
@@ -160,8 +165,8 @@ export const MoveInEnterpriseParamConfig = {
...
@@ -160,8 +165,8 @@ export const MoveInEnterpriseParamConfig = {
export
const
FinancingParamUpdateConfig
=
{
export
const
FinancingParamUpdateConfig
=
{
uscc
:{
type
:
"String"
},
//统一信用代码
uscc
:{
type
:
"String"
},
//统一信用代码
name
:{
type
:
"String"
},
//企业名称
name
:{
type
:
"String"
},
//企业名称
logonAdd
:{
type
:
"String
"
},
//注册地址
logonAdd
ress
:{
type
:
"Address
"
},
//注册地址
operatingAdd
:{
type
:
"String
"
},
//经营地址
operatingAdd
ress
:{
type
:
"Address
"
},
//经营地址
financingAmount
:{
type
:
"Number"
},
//融资金额(万元)
financingAmount
:{
type
:
"Number"
},
//融资金额(万元)
investmentInstitutionsName
:{
type
:
"String"
},
//投资机构名称
investmentInstitutionsName
:{
type
:
"String"
},
//投资机构名称
timeToObtainInvestment
:{
type
:
"Number"
},
//获得投资时间
timeToObtainInvestment
:{
type
:
"Number"
},
//获得投资时间
...
@@ -179,8 +184,8 @@ export const FinancingParamUpdateConfig = {
...
@@ -179,8 +184,8 @@ export const FinancingParamUpdateConfig = {
*/
*/
export
const
FinancingParamConfig
=
{
export
const
FinancingParamConfig
=
{
name
:{
type
:
"String"
},
//企业名称
name
:{
type
:
"String"
},
//企业名称
logonAdd
:{
type
:
"String
"
},
//注册地址
logonAdd
ress
:{
type
:
"Address
"
},
//注册地址
operatingAdd
:{
type
:
"String
"
},
//经营地址
operatingAdd
ress
:{
type
:
"Address
"
},
//经营地址
financingAmount
:{
type
:
"Number"
},
//融资金额(万元)
financingAmount
:{
type
:
"Number"
},
//融资金额(万元)
investmentInstitutionsName
:{
type
:
"String"
},
//投资机构名称
investmentInstitutionsName
:{
type
:
"String"
},
//投资机构名称
timeToObtainInvestment
:{
type
:
"Number"
},
//获得投资时间
timeToObtainInvestment
:{
type
:
"Number"
},
//获得投资时间
...
@@ -228,8 +233,8 @@ export const UpdateMyEnterpriseBaseDataConfig = {
...
@@ -228,8 +233,8 @@ export const UpdateMyEnterpriseBaseDataConfig = {
logonTime
:{
type
:
"Number"
},
//注册时间
logonTime
:{
type
:
"Number"
},
//注册时间
firstIncubationTime
:{
type
:
"Number"
},
//首次入孵时间
firstIncubationTime
:{
type
:
"Number"
},
//首次入孵时间
isNaturalPersonHolding
:{
type
:
"Boolean"
},
//是否自然人控股企业
isNaturalPersonHolding
:{
type
:
"Boolean"
},
//是否自然人控股企业
logonAdd
:{
type
:
"String
"
},
//注册地址
logonAdd
ress
:{
type
:
"Address
"
},
//注册地址
operatingAdd
:{
type
:
"String
"
},
//经营地址
operatingAdd
ress
:{
type
:
"Address
"
},
//经营地址
}
}
...
@@ -246,11 +251,11 @@ export const ReplenishMyEnterpriseInPutDataConfig = {
...
@@ -246,11 +251,11 @@ export const ReplenishMyEnterpriseInPutDataConfig = {
logonTime
:{
type
:
"Number"
},
//注册时间
logonTime
:{
type
:
"Number"
},
//注册时间
firstIncubationTime
:{
type
:
"Number"
},
//首次入孵时间
firstIncubationTime
:{
type
:
"Number"
},
//首次入孵时间
isNaturalPersonHolding
:{
type
:
"Boolean"
},
//是否自然人控股企业
isNaturalPersonHolding
:{
type
:
"Boolean"
},
//是否自然人控股企业
logonAdd
:{
type
:
"String
"
},
//注册地址
logonAdd
ress
:{
type
:
"Address
"
},
//注册地址
operatingAdd
:{
type
:
"String
"
},
//经营地址
operatingAdd
ress
:{
type
:
"Address
"
},
//经营地址
leasedArea
:{
type
:
"Number"
},
//租赁面积(平方米)
leasedArea
:{
type
:
"Number"
},
//租赁面积(平方米)
timeOfImmigration
:{
type
:
"Number"
},
//迁入时间
timeOfImmigration
:{
type
:
"Number"
},
//迁入时间
oldLogonAdd
:{
type
:
"String
"
},
//迁入前注册地址
oldLogonAdd
ress
:{
type
:
"Address
"
},
//迁入前注册地址
}
}
...
@@ -267,8 +272,8 @@ export const ReplenishMyEnterpriseCreateDataConfig = {
...
@@ -267,8 +272,8 @@ export const ReplenishMyEnterpriseCreateDataConfig = {
logonTime
:{
type
:
"Number"
},
//注册时间
logonTime
:{
type
:
"Number"
},
//注册时间
firstIncubationTime
:{
type
:
"Number"
},
//首次入孵时间
firstIncubationTime
:{
type
:
"Number"
},
//首次入孵时间
isNaturalPersonHolding
:{
type
:
"Boolean"
},
//是否自然人控股企业
isNaturalPersonHolding
:{
type
:
"Boolean"
},
//是否自然人控股企业
logonAdd
:{
type
:
"String
"
},
//注册地址
logonAdd
ress
:{
type
:
"Address
"
},
//注册地址
operatingAdd
:{
type
:
"String
"
},
//经营地址
operatingAdd
ress
:{
type
:
"Address
"
},
//经营地址
leasedArea
:{
type
:
"Number"
},
//租赁面积(平方米)
leasedArea
:{
type
:
"Number"
},
//租赁面积(平方米)
}
}
src/config/enum.ts
View file @
e5651c63
...
@@ -190,6 +190,7 @@ export enum MOVEOUTTYPE{
...
@@ -190,6 +190,7 @@ export enum MOVEOUTTYPE{
迁出张江
_
仍在浦东
,
迁出张江
_
仍在浦东
,
迁出浦东
_
仍在上海
,
迁出浦东
_
仍在上海
,
迁出上海
,
迁出上海
,
毕业迁出
,
//2.1新加
}
}
...
@@ -202,9 +203,35 @@ export enum MOVEOUTCAUSE{
...
@@ -202,9 +203,35 @@ export enum MOVEOUTCAUSE{
经营成本过高
_
场地成本或人员成本
_
,
经营成本过高
_
场地成本或人员成本
_
,
办公空间拓展
_
无合适办公空间
_
,
办公空间拓展
_
无合适办公空间
_
,
产业环境不足
,
产业环境不足
,
其他
,
认定高新企业
=
7
,
//2.1加入 选择毕业迁出之后
认定专精特新
,
累计融资超
500
万元
,
年营业收超
1000
万元
}
/**
* 迁出原因 前端用 不包含 毕业原因
*/
export
enum
MOVEOUTCAUSE_CLIENT
{
政策不给力
=
1
,
人才需求不足
,
经营成本过高
_
场地成本或人员成本
_
,
办公空间拓展
_
无合适办公空间
_
,
产业环境不足
,
其他
其他
}
}
/**
* 毕业原因
* 2.1新加
*/
export
enum
GRADUATECAUSE
{
认定高新企业
=
7
,
//2.1加入 选择毕业迁出之后
认定专精特新
,
累计融资超
500
万元
,
年营业收超
1000
万元
}
/**
/**
...
...
src/config/errorEnum.ts
View file @
e5651c63
...
@@ -43,7 +43,8 @@ export enum ERRORENUM {
...
@@ -43,7 +43,8 @@ export enum ERRORENUM {
验证码失效
,
验证码失效
,
验证码过期
,
验证码过期
,
不能修改过期任务数据
,
不能修改过期任务数据
,
短信发送失败
短信发送失败
,
地址数据不完整
}
}
export
enum
ERRORCODEENUM
{
export
enum
ERRORCODEENUM
{
...
...
src/config/splitResultConfig.ts
View file @
e5651c63
...
@@ -47,8 +47,8 @@ export const EnterpriseInfoConfig = {
...
@@ -47,8 +47,8 @@ export const EnterpriseInfoConfig = {
logonTime
:{
key
:
"注册时间"
,
changeDate
:
true
},
//
logonTime
:{
key
:
"注册时间"
,
changeDate
:
true
},
//
firstIncubationTime
:{
key
:
"首次入孵时间"
,
changeDate
:
true
},
//
firstIncubationTime
:{
key
:
"首次入孵时间"
,
changeDate
:
true
},
//
isNaturalPersonHolding
:{
key
:
"是否自然人控股企业"
},
//
isNaturalPersonHolding
:{
key
:
"是否自然人控股企业"
},
//
logonAdd
:{
key
:
"注册地址"
},
//
logonAdd
ress
:{
key
:
"注册地址"
},
//
operatingAdd
:{
key
:
"经营地址"
},
//
operatingAdd
ress
:{
key
:
"经营地址"
},
//
leasedArea
:{
key
:
"租赁面积(平方米)"
},
leasedArea
:{
key
:
"租赁面积(平方米)"
},
mainBusiness
:{
key
:
"主营业务"
},
//主营业务
mainBusiness
:{
key
:
"主营业务"
},
//主营业务
};
};
...
@@ -67,11 +67,11 @@ export const EnterpriseMoveInInfoConfig = {
...
@@ -67,11 +67,11 @@ export const EnterpriseMoveInInfoConfig = {
logonTime
:{
key
:
"注册时间"
,
changeDate
:
true
},
//
logonTime
:{
key
:
"注册时间"
,
changeDate
:
true
},
//
firstIncubationTime
:{
key
:
"首次入孵时间"
,
changeDate
:
true
},
//
firstIncubationTime
:{
key
:
"首次入孵时间"
,
changeDate
:
true
},
//
isNaturalPersonHolding
:{
key
:
"是否自然人控股企业"
},
//
isNaturalPersonHolding
:{
key
:
"是否自然人控股企业"
},
//
logonAdd
:{
key
:
"注册地址"
},
//
logonAdd
ress
:{
key
:
"注册地址"
},
//
operatingAdd
:{
key
:
"经营地址"
},
//
operatingAdd
ress
:{
key
:
"经营地址"
},
//
leasedArea
:{
key
:
"租赁面积(平方米)"
},
leasedArea
:{
key
:
"租赁面积(平方米)"
},
timeOfImmigration
:{
key
:
"迁入时间"
,
changeDate
:
true
},
//
timeOfImmigration
:{
key
:
"迁入时间"
,
changeDate
:
true
},
//
oldLogonAdd
:{
key
:
"迁入前注册地址"
},
//
oldLogonAdd
ress
:{
key
:
"迁入前注册地址"
},
//
mainBusiness
:{
key
:
"主营业务"
},
//主营业务
mainBusiness
:{
key
:
"主营业务"
},
//主营业务
};
};
...
@@ -85,8 +85,8 @@ export const EnterpriseMoveInInfoConfig = {
...
@@ -85,8 +85,8 @@ export const EnterpriseMoveInInfoConfig = {
export
const
EnterpriseFinancingInfoConfig
=
{
export
const
EnterpriseFinancingInfoConfig
=
{
uscc
:{
key
:
"统一信用代码"
},
//
uscc
:{
key
:
"统一信用代码"
},
//
name
:{
key
:
"企业名称"
},
//
name
:{
key
:
"企业名称"
},
//
logonAdd
:{
key
:
"注册地址"
},
//
logonAdd
ress
:{
key
:
"注册地址"
},
//
operatingAdd
:{
key
:
"经营地址"
},
//
operatingAdd
ress
:{
key
:
"经营地址"
},
//
financingAmount
:{
key
:
"融资金额(万元)"
},
//
financingAmount
:{
key
:
"融资金额(万元)"
},
//
investmentInstitutionsName
:{
key
:
"投资机构名称"
},
//
investmentInstitutionsName
:{
key
:
"投资机构名称"
},
//
timeToObtainInvestment
:{
key
:
"获得投资时间"
,
changeDate
:
true
},
//
timeToObtainInvestment
:{
key
:
"获得投资时间"
,
changeDate
:
true
},
//
...
@@ -223,7 +223,12 @@ export const FuHuaQiBaseDataConfig = {
...
@@ -223,7 +223,12 @@ export const FuHuaQiBaseDataConfig = {
incubatedAcreage
:{
key
:
"在孵面积"
},
incubatedAcreage
:{
key
:
"在孵面积"
},
acreageTotal
:{
key
:
"孵化器总面积"
},
acreageTotal
:{
key
:
"孵化器总面积"
},
acreagePersonalUse
:{
key
:
"孵化器自用面积"
},
acreagePersonalUse
:{
key
:
"孵化器自用面积"
},
hatchingGround
:{
key
:
"经备案孵化场地"
}
hatchingGround
:{
key
:
"经备案孵化场地"
},
isProfessionalTechnology
:{
key
:
"是否专业技术平台"
},
professionalTechnologyName
:{
key
:
"专业技术平台名称"
},
professionalTechnologyCreateTime
:{
key
:
"专业技术平台时间"
},
professionalTechnologyAmount
:{
key
:
"专业技术平台投资金额"
},
enterpriseTotal
:{
key
:
"累计企业"
}
}
}
...
@@ -280,8 +285,8 @@ export const MyEnterpriseBaseDataConfig = {
...
@@ -280,8 +285,8 @@ export const MyEnterpriseBaseDataConfig = {
logonTime
:{
key
:
"注册时间"
},
//
logonTime
:{
key
:
"注册时间"
},
//
firstIncubationTime
:{
key
:
"首次入孵时间"
},
//
firstIncubationTime
:{
key
:
"首次入孵时间"
},
//
isNaturalPersonHolding
:{
key
:
"是否自然人控股企业"
},
//
isNaturalPersonHolding
:{
key
:
"是否自然人控股企业"
},
//
logonAdd
:{
key
:
"注册地址"
},
//
logonAdd
ress
:{
key
:
"注册地址"
},
//
operatingAdd
:{
key
:
"经营地址"
},
//
operatingAdd
ress
:{
key
:
"经营地址"
},
//
}
}
src/data/enterprise/enterprise.ts
View file @
e5651c63
...
@@ -35,6 +35,10 @@ const enterpriseSchema = new Schema({
...
@@ -35,6 +35,10 @@ const enterpriseSchema = new Schema({
moveOutType
:
Number
,
// 迁出类型 遵循 MOVEOUTTYPE 的值 ----2.0
moveOutType
:
Number
,
// 迁出类型 遵循 MOVEOUTTYPE 的值 ----2.0
moveOutCause
:[
Number
],
//迁出原因 遵循 MOVEOUTCAUSE 的值 ----2.0
moveOutCause
:[
Number
],
//迁出原因 遵循 MOVEOUTCAUSE 的值 ----2.0
moveOutTime
:
Number
,
//迁出时间
moveOutTime
:
Number
,
//迁出时间
/**2.0 后改的地址 */
logonAddress
:{
type
:[
String
],
default
:[]},
//注册地址
operatingAddress
:{
type
:[
String
],
default
:[]},
//经营地址
oldLogonAddress
:{
type
:[
String
],
default
:[]},
//迁入前注册地址
});
});
var
enterpriseModel
;
var
enterpriseModel
;
...
@@ -133,6 +137,15 @@ export async function findEnterpriseCountByFuHuaQiUscc(fuHuaQiUscc:string) {
...
@@ -133,6 +137,15 @@ export async function findEnterpriseCountByFuHuaQiUscc(fuHuaQiUscc:string) {
return
await
enterpriseModel
.
find
({
fuHuaQiUscc
,
state
:{
"$ne"
:
4
}}).
count
();
return
await
enterpriseModel
.
find
({
fuHuaQiUscc
,
state
:{
"$ne"
:
4
}}).
count
();
}
}
/**
* 查找孵化器累计企业数量
* @param fuHuaQiUscc 孵化器统一信用代码
* @returns number 孵化器拥有的企业数量
*/
export
async
function
findEnterpriseTotalByFuHuaQiUscc
(
fuHuaQiUscc
:
string
)
{
return
await
enterpriseModel
.
find
({
fuHuaQiUscc
}).
count
();
}
/**
/**
* 聚合查询 孵化器所拥有的企业数量
* 聚合查询 孵化器所拥有的企业数量
...
@@ -209,7 +222,7 @@ export async function findEnterpriseInfoByName(name:string) {
...
@@ -209,7 +222,7 @@ export async function findEnterpriseInfoByName(name:string) {
* @returns []
* @returns []
*/
*/
export
async
function
findSubmittedEnterpriseListByFuHuaQiUscc
(
fuHuaQiUscc
:
string
)
{
export
async
function
findSubmittedEnterpriseListByFuHuaQiUscc
(
fuHuaQiUscc
:
string
)
{
return
await
enterpriseModel
.
find
({
fuHuaQiUscc
,
draftLock
:
true
},
'name logonAdd
operatingAdd
state'
);
return
await
enterpriseModel
.
find
({
fuHuaQiUscc
,
draftLock
:
true
},
'name logonAdd
ress operatingAddress
state'
);
}
}
...
...
src/data/enterprise/financing.ts
View file @
e5651c63
...
@@ -25,6 +25,10 @@ const financingSchema = new Schema({
...
@@ -25,6 +25,10 @@ const financingSchema = new Schema({
industry
:[
Number
],
//领域
industry
:[
Number
],
//领域
logonTime
:
Number
,
//注册时间
logonTime
:
Number
,
//注册时间
financingRounds
:
Number
,
//融资轮次
financingRounds
:
Number
,
//融资轮次
/**2.0新加的 */
logonAddress
:{
type
:[
String
],
default
:[]},
//注册地址
operatingAddress
:{
type
:[
String
],
default
:[]},
//经营地址
});
});
var
financingModel
;
var
financingModel
;
...
...
src/data/fuHuaQi/fuhuaqi.ts
View file @
e5651c63
...
@@ -19,13 +19,15 @@ const foundingTeamSchema = new Schema({
...
@@ -19,13 +19,15 @@ const foundingTeamSchema = new Schema({
des
:
String
,
//履历描述
des
:
String
,
//履历描述
},{
_id
:
false
});
},{
_id
:
false
});
/**经备案场地地址 */
const
hatchingGroundSchema
=
new
Schema
({
const
hatchingGroundSchema
=
new
Schema
({
personInChargeAdd
:
String
,
//孵化场地地址
//
personInChargeAdd:String,//孵化场地地址
siteAcreage
:
Number
,
//孵化场地面积(㎡)
siteAcreage
:
Number
,
//孵化场地面积(㎡)
leasePrice
:
Number
,
//孵化场地出租单价
leasePrice
:
Number
,
//孵化场地出租单价
/**2.0 后改的地址 */
personInChargeAddress
:{
type
:[
String
],
default
:[]}
},{
_id
:
false
});
},{
_id
:
false
});
const
fuHuaQiSchema
=
new
Schema
({
const
fuHuaQiSchema
=
new
Schema
({
name
:
{
type
:
String
,
index
:
true
},
//名称
name
:
{
type
:
String
,
index
:
true
},
//名称
operationName
:
String
,
//运营机构名称 不可修改
operationName
:
String
,
//运营机构名称 不可修改
...
@@ -46,8 +48,15 @@ const fuHuaQiSchema = new Schema({
...
@@ -46,8 +48,15 @@ const fuHuaQiSchema = new Schema({
hatchingGround
:{
type
:[
hatchingGroundSchema
],
default
:[]
},
//经备案孵化场地
hatchingGround
:{
type
:[
hatchingGroundSchema
],
default
:[]
},
//经备案孵化场地
foundingTeam
:{
type
:[
foundingTeamSchema
],
default
:[]},
//创业团队
foundingTeam
:{
type
:[
foundingTeamSchema
],
default
:[]},
//创业团队
foundingTeamType
:{
type
:
Number
,
default
:
1
},
//创业团队类型
foundingTeamType
:{
type
:
Number
,
default
:
1
},
//创业团队类型
operationModel
:{
type
:[
Number
],
default
:[]},
//运营模式
operationModel
:{
type
:[
Number
],
default
:[]},
//运营模式
operationModelDes
:
String
,
//运营模式描述
operationModelDes
:
String
,
//运营模式描述
/**专业技术平台 */
isProfessionalTechnology
:
Boolean
,
//是否专业技术平台
professionalTechnologyName
:
String
,
//专业技术平台名称
professionalTechnologyCreateTime
:
Number
,
//时间 年份 xxxx年01月01日 的时间戳
professionalTechnologyAmount
:
Number
,
//投资金额 万元
/** 累计孵化企业数量*/
fuHuaEnterpriseTotal
:{
type
:
Number
,
default
:
0
},
//累计孵化企业数量 初始值
/**用户相关 */
/**用户相关 */
pwd
:
String
,
//登录密码
pwd
:
String
,
//登录密码
token
:{
type
:
String
,
index
:
true
},
token
:{
type
:
String
,
index
:
true
},
...
...
src/main.ts
View file @
e5651c63
...
@@ -4,6 +4,7 @@ import { initConfig, systemConfig} from "./config/serverConfig";
...
@@ -4,6 +4,7 @@ import { initConfig, systemConfig} from "./config/serverConfig";
import
{
initDB
}
from
"./db/mongo/dbInit"
;
import
{
initDB
}
from
"./db/mongo/dbInit"
;
import
{
httpServer
}
from
"./net/http_server"
;
import
{
httpServer
}
from
"./net/http_server"
;
import
{
initBasicData
}
from
"./tools/dataInit"
;
import
{
initBasicData
}
from
"./tools/dataInit"
;
import
{
get
}
from
"./util/request"
;
async
function
lanuch
()
{
async
function
lanuch
()
{
/**初始化配置解析 */
/**初始化配置解析 */
...
@@ -26,4 +27,5 @@ async function lanuch() {
...
@@ -26,4 +27,5 @@ async function lanuch() {
lanuch
();
lanuch
();
\ No newline at end of file
src/routers/provide.ts
View file @
e5651c63
...
@@ -14,6 +14,9 @@ export function setRouter(httpServer) {
...
@@ -14,6 +14,9 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/admin/provide/task/updatetaskyear'
,
checkInterior
,
asyncHandler
(
updateTaskYear
));
httpServer
.
post
(
'/admin/provide/task/updatetaskyear'
,
checkInterior
,
asyncHandler
(
updateTaskYear
));
httpServer
.
post
(
'/admin/provide/task/initScore'
,
checkInterior
,
asyncHandler
(
initScore
));
httpServer
.
post
(
'/admin/provide/task/initScore'
,
checkInterior
,
asyncHandler
(
initScore
));
httpServer
.
post
(
'/admin/provide/task/replenishtaskcount'
,
checkInterior
,
asyncHandler
(
replenishTaskCount
));
httpServer
.
post
(
'/admin/provide/task/replenishtaskcount'
,
checkInterior
,
asyncHandler
(
replenishTaskCount
));
/**2.1 */
httpServer
.
post
(
'/admin/provide/data/updateadd'
,
checkInterior
,
asyncHandler
(
updateAddress
));
}
}
...
@@ -71,3 +74,8 @@ async function replenishTaskCount(req, res) {
...
@@ -71,3 +74,8 @@ async function replenishTaskCount(req, res) {
res
.
success
({
isUsccess
:
true
});
res
.
success
({
isUsccess
:
true
});
}
}
async
function
updateAddress
(
req
,
res
)
{
await
provideBiz
.
updateAdd
();
res
.
success
({
isUsccess
:
true
});
}
\ No newline at end of file
src/routers/public.ts
View file @
e5651c63
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*/
*/
import
*
as
asyncHandler
from
'express-async-handler'
;
import
*
as
asyncHandler
from
'express-async-handler'
;
import
{
FUHUAQILV
,
INSTITUTIONALNATURE
,
FUHUAINDUSTRY
,
INDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
OPERATIONMODEL
,
TEAM
,
DEGREE
,
FINANCINGROUNDS
,
INSIDESTATE
,
VIRTUALCAUSE
,
MOVEOUTTYPE
,
MOVEOUTCAUSE
}
from
'../config/enum'
;
import
{
FUHUAQILV
,
INSTITUTIONALNATURE
,
FUHUAINDUSTRY
,
INDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
OPERATIONMODEL
,
TEAM
,
DEGREE
,
FINANCINGROUNDS
,
INSIDESTATE
,
VIRTUALCAUSE
,
MOVEOUTTYPE
,
MOVEOUTCAUSE
,
GRADUATECAUSE
,
MOVEOUTCAUSE_CLIENT
}
from
'../config/enum'
;
export
function
setRouter
(
httpServer
)
{
export
function
setRouter
(
httpServer
)
{
httpServer
.
post
(
'/public/fuhuaqilv'
,
asyncHandler
(
getFuHuaQiLv
));
httpServer
.
post
(
'/public/fuhuaqilv'
,
asyncHandler
(
getFuHuaQiLv
));
...
@@ -20,6 +20,24 @@ export function setRouter(httpServer) {
...
@@ -20,6 +20,24 @@ export function setRouter(httpServer) {
httpServer
.
post
(
'/public/virtualcause'
,
asyncHandler
(
virtualCause
));
httpServer
.
post
(
'/public/virtualcause'
,
asyncHandler
(
virtualCause
));
httpServer
.
post
(
'/public/moveouttype'
,
asyncHandler
(
moveOutType
));
httpServer
.
post
(
'/public/moveouttype'
,
asyncHandler
(
moveOutType
));
httpServer
.
post
(
'/public/moveoutcause'
,
asyncHandler
(
moveOutCause
));
httpServer
.
post
(
'/public/moveoutcause'
,
asyncHandler
(
moveOutCause
));
/**2.1 */
httpServer
.
post
(
'/public/graduatecause'
,
asyncHandler
(
graduateCauseType
));
}
/**
* 迁出类型
*/
function
graduateCauseType
(
req
,
res
)
{
let
dataList
=
[];
for
(
let
key
in
GRADUATECAUSE
)
{
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
let
keyStr
=
key
;
dataList
.
push
({
key
:
keyStr
,
value
:
GRADUATECAUSE
[
key
]});
}
}
res
.
success
({
dataList
});
}
}
...
@@ -48,7 +66,7 @@ function moveOutType(req, res) {
...
@@ -48,7 +66,7 @@ function moveOutType(req, res) {
*/
*/
function
moveOutCause
(
req
,
res
)
{
function
moveOutCause
(
req
,
res
)
{
let
dataList
=
[];
let
dataList
=
[];
for
(
let
key
in
MOVEOUTCAUSE
)
{
for
(
let
key
in
MOVEOUTCAUSE
_CLIENT
)
{
let
anyKey
:
any
=
key
;
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
if
(
isNaN
(
anyKey
))
{
let
keyStr
=
key
;
let
keyStr
=
key
;
...
@@ -57,7 +75,7 @@ function moveOutCause(req, res) {
...
@@ -57,7 +75,7 @@ function moveOutCause(req, res) {
keyStr
=
keyStr
.
replace
(
"_"
,
")"
);
keyStr
=
keyStr
.
replace
(
"_"
,
")"
);
}
}
dataList
.
push
({
key
:
keyStr
,
value
:
MOVEOUTCAUSE
[
key
]});
dataList
.
push
({
key
:
keyStr
,
value
:
MOVEOUTCAUSE
_CLIENT
[
key
]});
}
}
}
}
res
.
success
({
dataList
});
res
.
success
({
dataList
});
...
...
src/tools/system.ts
View file @
e5651c63
...
@@ -166,4 +166,6 @@ export function getSMSCode() {
...
@@ -166,4 +166,6 @@ export function getSMSCode() {
code
+=
Math
.
floor
(
Math
.
random
()
*
10
)
code
+=
Math
.
floor
(
Math
.
random
()
*
10
)
}
}
return
code
;
return
code
;
}
}
\ No newline at end of file
src/util/verificationParam.ts
View file @
e5651c63
...
@@ -68,6 +68,39 @@ export function eccFormParam(name:string, keyTypeConf:object, param:object) {
...
@@ -68,6 +68,39 @@ export function eccFormParam(name:string, keyTypeConf:object, param:object) {
}
}
}
}
break
;
break
;
case
'Address'
:
/**地址类型 基本数据类型为数组字符串但是要判断层级关系 */
if
(
!
Array
.
isArray
(
param
[
key
])
)
{
isError
=
true
;
errorStr
=
`
${
key
}
应是数组形`
;
}
if
(
param
[
key
].
length
!=
4
)
{
isError
=
true
;
errorStr
=
`
${
key
}
超过特定长度4 目前长度
${
param
[
key
].
length
}
`
;
}
for
(
let
i
=
0
;
i
<
param
[
key
].
length
;
i
++
)
{
let
item
=
param
[
key
][
i
];
if
(
typeof
item
!=
'string'
)
{
isError
=
true
;
errorStr
=
`
${
key
}
应是string型数组其中下标
${
i
}
是
${
typeof
item
}
`
;
}
}
/** 不符合规则的 */
let
nullIndex
=
-
1
;
for
(
let
i
=
0
;
i
<
param
[
key
].
length
;
i
++
)
{
if
(
nullIndex
!=
-
1
)
{
//出现过空 第一次出现后的位置 都不能有值
if
(
param
[
key
])
{
//做一个特化
throw
new
BizError
(
ERRORENUM
.
地址数据不完整
,
`
${
key
}
下标
${
nullIndex
}
为空 `
);
}
}
if
(
nullIndex
==
-
1
&&
!
param
[
key
][
i
])
{
/**按顺序第一次赋值 */
nullIndex
=
i
;
}
}
break
;
}
}
errorStr
=
isError
&&
errorStr
==
""
?
`
${
key
}
应该是
${
type
}
型 而不是
${
paramType
}
`
:
errorStr
;
errorStr
=
isError
&&
errorStr
==
""
?
`
${
key
}
应该是
${
type
}
型 而不是
${
paramType
}
`
:
errorStr
;
...
@@ -137,6 +170,39 @@ export function eccReqParamater(conf:object, param, skipKeys?) {
...
@@ -137,6 +170,39 @@ export function eccReqParamater(conf:object, param, skipKeys?) {
}
}
}
}
break
;
break
;
case
'Address'
:
/**地址类型 基本数据类型为数组字符串但是要判断层级关系 */
if
(
!
Array
.
isArray
(
param
[
key
])
)
{
isError
=
true
;
errorStr
=
`
${
key
}
应是数组形`
;
}
if
(
param
[
key
].
length
!=
4
)
{
isError
=
true
;
errorStr
=
`
${
key
}
超过特定长度4 目前长度
${
param
[
key
].
length
}
`
;
}
for
(
let
i
=
0
;
i
<
param
[
key
].
length
;
i
++
)
{
let
item
=
param
[
key
][
i
];
if
(
typeof
item
!=
'string'
)
{
isError
=
true
;
errorStr
=
`
${
key
}
应是string型数组其中下标
${
i
}
是
${
typeof
item
}
`
;
}
}
/** 不符合规则的 */
let
nullIndex
=
-
1
;
for
(
let
i
=
0
;
i
<
param
[
key
].
length
;
i
++
)
{
if
(
nullIndex
!=
-
1
)
{
//出现过空 第一次出现后的位置 都不能有值
if
(
param
[
key
])
{
//做一个特化
throw
new
BizError
(
ERRORENUM
.
地址数据不完整
,
`
${
key
}
下标
${
nullIndex
}
为空 `
);
}
}
if
(
nullIndex
==
-
1
&&
!
param
[
key
][
i
])
{
/**按顺序第一次赋值 */
nullIndex
=
i
;
}
}
break
;
}
}
errorStr
=
isError
&&
errorStr
==
""
?
`
${
key
}
应该是
${
type
}
型 而不是
${
paramType
}
`
:
errorStr
;
errorStr
=
isError
&&
errorStr
==
""
?
`
${
key
}
应该是
${
type
}
型 而不是
${
paramType
}
`
:
errorStr
;
}
}
...
...
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