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
b271f11c
Commit
b271f11c
authored
Aug 28, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分数
parent
6dbdb224
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
421 additions
and
15 deletions
+421
-15
企业经营数据底库数据.xlsx
res/企业经营数据底库数据.xlsx
+0
-0
enterprise.ts
src/biz/admin/enterprise/enterprise.ts
+5
-3
financing.ts
src/biz/admin/enterprise/financing.ts
+2
-0
instituQualify.ts
src/biz/admin/fuHuaQi/instituQualify.ts
+9
-6
task.ts
src/biz/admin/fuHuaQi/task.ts
+2
-2
provide.ts
src/biz/admin/provide.ts
+251
-1
fuhuaqiBase.ts
src/biz/admin/stats/guanWeiHui/fuhuaqiBase.ts
+1
-1
businessData.ts
src/biz/mobileEnterprise/quarterTask/businessData.ts
+2
-0
splitResultConfig.ts
src/config/splitResultConfig.ts
+1
-0
team.ts
src/data/enterprise/quarterTask/team.ts
+2
-1
scoreLog.ts
src/data/fuHuaQi/scoreLog.ts
+6
-0
scoreLogRepair.ts
src/data/fuHuaQi/scoreLogRepair.ts
+40
-0
scoreRepair.ts
src/data/fuHuaQi/scoreRepair.ts
+66
-0
tableInit.ts
src/db/mongo/tableInit.ts
+9
-0
provide.ts
src/routers/provide.ts
+24
-0
analysisExcel.ts
src/util/analysisExcel.ts
+1
-1
No files found.
res/企业经营数据底库数据.xlsx
0 → 100644
View file @
b271f11c
File added
src/biz/admin/enterprise/enterprise.ts
View file @
b271f11c
...
@@ -333,6 +333,7 @@ export async function enterpriseMoveOutList(name:string, fuHuaQiUscc:string, ind
...
@@ -333,6 +333,7 @@ export async function enterpriseMoveOutList(name:string, fuHuaQiUscc:string, ind
changeData
.
industry
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
INDUSTRY
,
changeData
.
industry
)
||
"-"
;
changeData
.
industry
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
INDUSTRY
,
changeData
.
industry
)
||
"-"
;
changeData
.
moveOutCause
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTCAUSE
,
changeData
.
moveOutCause
);
changeData
.
moveOutCause
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTCAUSE
,
changeData
.
moveOutCause
);
changeData
.
moveOutTrace
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTTRACE
,
changeData
.
moveOutTrace
);
changeData
.
moveOutType
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTTYPE
,
changeData
.
moveOutType
);
changeData
.
moveOutType
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTTYPE
,
changeData
.
moveOutType
);
changeData
.
logonAdd
=
changeAddToString
(
changeData
.
logonAddress
)
||
"-"
;
changeData
.
logonAdd
=
changeAddToString
(
changeData
.
logonAddress
)
||
"-"
;
...
@@ -383,10 +384,10 @@ export async function outPutEnterpriseMoveOutList(name:string, fuHuaQiUscc:strin
...
@@ -383,10 +384,10 @@ export async function outPutEnterpriseMoveOutList(name:string, fuHuaQiUscc:strin
let
usccMap
=
await
fuHuaQiData
.
findAllFuHuaQiOperationNameMap
();
//用于将孵化器uscc变成孵化器名称
let
usccMap
=
await
fuHuaQiData
.
findAllFuHuaQiOperationNameMap
();
//用于将孵化器uscc变成孵化器名称
let
dataBaseList
=
await
enterpriseData
.
findEnterpriseList
(
selectParam
);
let
dataBaseList
=
await
enterpriseData
.
findEnterpriseList
(
selectParam
);
let
keyList
=
[
"name"
,
"moveOutTime"
,
"moveOutType"
,
"moveOutCause"
,
"fuHuaQiUscc"
,
"industry"
,
let
keyList
=
[
"name"
,
"moveOutTime"
,
"moveOutType"
,
"moveOut
Trace"
,
"moveOut
Cause"
,
"fuHuaQiUscc"
,
"industry"
,
"createTime"
,
"uscc"
,
"mainBusiness"
,
"logonTime"
,
"timeOfImmigration"
,
"oldLogonAdd"
,
"firstIncubationTime"
,
"createTime"
,
"uscc"
,
"mainBusiness"
,
"logonTime"
,
"timeOfImmigration"
,
"oldLogonAdd"
,
"firstIncubationTime"
,
"isNaturalPersonHolding"
,
"logonAdd"
,
"operatingAdd"
,
"leasedArea"
];
"isNaturalPersonHolding"
,
"logonAdd"
,
"operatingAdd"
,
"leasedArea"
];
let
titleList
=
[
"企业名称"
,
" 迁出时间"
,
" 迁出类型"
,
"
迁出原因"
,
" 前所属孵化器"
,
" 行业领域"
,
let
titleList
=
[
"企业名称"
,
" 迁出时间"
,
" 迁出类型"
,
"
迁出方向"
,
"
迁出原因"
,
" 前所属孵化器"
,
" 行业领域"
,
"入库时间"
,
"统一信用代码"
,
"主营业务"
,
"注册时间"
,
"迁入时间"
,
"迁入前注册地址"
,
"入库时间"
,
"统一信用代码"
,
"主营业务"
,
"注册时间"
,
"迁入时间"
,
"迁入前注册地址"
,
"首次入孵时间"
,
"是否自然人控股"
,
"注册地址"
,
"经营地址"
,
"租赁面积(平方米)"
];
"首次入孵时间"
,
"是否自然人控股"
,
"注册地址"
,
"经营地址"
,
"租赁面积(平方米)"
];
/**组合返回结果 */
/**组合返回结果 */
...
@@ -404,6 +405,7 @@ export async function outPutEnterpriseMoveOutList(name:string, fuHuaQiUscc:strin
...
@@ -404,6 +405,7 @@ export async function outPutEnterpriseMoveOutList(name:string, fuHuaQiUscc:strin
changeData
.
moveOutCause
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTCAUSE
,
changeData
.
moveOutCause
);
changeData
.
moveOutCause
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTCAUSE
,
changeData
.
moveOutCause
);
changeData
.
moveOutType
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTTYPE
,
changeData
.
moveOutType
);
changeData
.
moveOutType
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTTYPE
,
changeData
.
moveOutType
);
changeData
.
moveOutTrace
=
verificationEnumTools
.
changeEnumValue
(
configEnum
.
MOVEOUTTRACE
,
changeData
.
moveOutTrace
);
changeData
.
logonAdd
=
changeAddToString
(
changeData
.
logonAddress
)
||
"-"
;
changeData
.
logonAdd
=
changeAddToString
(
changeData
.
logonAddress
)
||
"-"
;
changeData
.
operatingAdd
=
changeAddToString
(
changeData
.
operatingAddress
)
||
"-"
;
changeData
.
operatingAdd
=
changeAddToString
(
changeData
.
operatingAddress
)
||
"-"
;
...
@@ -484,7 +486,7 @@ export async function outPutBusinessDataList(name:string, year:number, quarter:n
...
@@ -484,7 +486,7 @@ export async function outPutBusinessDataList(name:string, year:number, quarter:n
let
dataBaseList
=
await
businessData
.
findBusinessDataByParams
(
selectParam
);
let
dataBaseList
=
await
businessData
.
findBusinessDataByParams
(
selectParam
);
let
keyList
=
[
"name"
,
"year"
,
"quarter"
,
"BI"
,
"RD"
,
"TXP"
];
let
keyList
=
[
"name"
,
"year"
,
"quarter"
,
"BI"
,
"RD"
,
"TXP"
];
let
titleList
=
[
"企业名称"
,
"
季度"
,
" 年
度"
,
" 营业收入"
,
" 研发投入"
,
" 纳税"
];
let
titleList
=
[
"企业名称"
,
"
年度"
,
" 季
度"
,
" 营业收入"
,
" 研发投入"
,
" 纳税"
];
let
dataList
=
[
titleList
];
let
dataList
=
[
titleList
];
dataBaseList
.
forEach
(
info
=>
{
dataBaseList
.
forEach
(
info
=>
{
...
...
src/biz/admin/enterprise/financing.ts
View file @
b271f11c
...
@@ -198,6 +198,8 @@ export async function outPutEnterpriseFinancing(name:string, financingRounds:num
...
@@ -198,6 +198,8 @@ export async function outPutEnterpriseFinancing(name:string, financingRounds:num
dataBaseList
.
forEach
(
info
=>
{
dataBaseList
.
forEach
(
info
=>
{
let
changeData
:
any
=
extractData
(
splitResultConfig
.
EnterpriseFinancingDataConfig
,
info
,
true
);
let
changeData
:
any
=
extractData
(
splitResultConfig
.
EnterpriseFinancingDataConfig
,
info
,
true
);
changeData
.
fuHuaQiInvestment
=
changeData
.
fuHuaQiInvestment
?
"是"
:
"否"
;
changeData
.
fuHuaQiInvestment
=
changeData
.
fuHuaQiInvestment
?
"是"
:
"否"
;
changeData
.
financingRounds
=
changeEnumValue
(
configEnum
.
FINANCINGROUNDS
,
changeData
.
financingRounds
);
changeData
.
fuHuaQiInvestmentStyle
=
changeEnumValue
(
configEnum
.
FUHUAQILNVESTMENTSTYLE
,
changeData
.
fuHuaQiInvestmentStyle
);
let
subList
=
[];
let
subList
=
[];
for
(
let
i
=
0
;
i
<
keyList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
keyList
.
length
;
i
++
)
{
...
...
src/biz/admin/fuHuaQi/instituQualify.ts
View file @
b271f11c
...
@@ -183,7 +183,7 @@ export async function outputIcrDataList(fuHuaQiName:string, cMode:number, type:n
...
@@ -183,7 +183,7 @@ export async function outputIcrDataList(fuHuaQiName:string, cMode:number, type:n
let
dataList
=
[[
"运营机构名称"
,
"合作机构"
,
"合作企业"
,
"合作方式"
,
"合作成果"
,
"开始时间"
]];
let
dataList
=
[[
"运营机构名称"
,
"合作机构"
,
"合作企业"
,
"合作方式"
,
"合作成果"
,
"开始时间"
]];
dataBaseList
.
forEach
(
info
=>
{
dataBaseList
.
forEach
(
info
=>
{
let
subList
=
[
info
.
name
,
info
.
po
,
info
.
ce
,
info
.
cMode
,
info
.
cAchievements
,
info
.
startTimeMs
];
let
subList
=
[
info
.
name
,
info
.
po
,
info
.
ce
,
info
.
cMode
,
info
.
cAchievements
,
moment
(
info
.
startTimeMs
).
format
(
"YYYY-MM-DD"
)
];
dataList
.
push
(
subList
);
dataList
.
push
(
subList
);
});
});
...
@@ -287,7 +287,7 @@ export async function getPTPDataList(name:string, isCreatePTP:number, isParticip
...
@@ -287,7 +287,7 @@ export async function getPTPDataList(name:string, isCreatePTP:number, isParticip
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
name
)
selectParam
.
operationName
=
{
"$regex"
:
`
${
name
}
`
};
if
(
name
)
selectParam
.
operationName
=
{
"$regex"
:
`
${
name
}
`
};
if
(
isCreatePTP
)
selectParam
.
isCreatePTP
=
isCreatePTP
;
if
(
isCreatePTP
)
selectParam
.
isCreatePTP
=
isCreatePTP
;
if
(
isParticipateInPTP
!=
1
)
{
if
(
isParticipateInPTP
)
{
if
(
isParticipateInPTP
==
2
)
selectParam
.
isParticipateInPTP
=
true
;
if
(
isParticipateInPTP
==
2
)
selectParam
.
isParticipateInPTP
=
true
;
else
selectParam
.
isParticipateInPTP
=
false
;
else
selectParam
.
isParticipateInPTP
=
false
;
}
}
...
@@ -299,17 +299,20 @@ export async function getPTPDataList(name:string, isCreatePTP:number, isParticip
...
@@ -299,17 +299,20 @@ export async function getPTPDataList(name:string, isCreatePTP:number, isParticip
dataList
.
push
({
dataList
.
push
({
name
:
info
.
operationName
,
//运营机构名称
name
:
info
.
operationName
,
//运营机构名称
isCreatePTP
:
changeEnumValue
(
STATEENUM
,
info
.
isCreatePTP
),
//基金规模(万元)
isCreatePTP
:
changeEnumValue
(
STATEENUM
,
info
.
isCreatePTP
),
//基金规模(万元)
scalePTP
:
info
.
scalePTP
,
//基金规模
scalePTP
:
info
.
scalePTP
,
isParticipateInPTP
:
info
.
isParticipateInPTP
?
"是"
:
"否"
,
//是否参与创投基金
isParticipateInPTP
:
info
.
isParticipateInPTP
==
true
?
"是"
:
"否"
,
//是否参与创投基金
participatingFundCompany
:
info
.
participatingFundCompany
//参股基金公司名
participatingFundCompany
:
info
.
participatingFundCompany
//参股基金公司名
});
});
});
});
// isCreatePTP:Number,//是否成立创投基金
// scalePTP:Number,//基金规模
// isParticipateInPTP:Boolean,//是否参与创投基金
// participatingFundCompany:String,//参股基金公司名
return
{
count
,
dataList
,
pageCount
:
Math
.
ceil
(
count
/
10
)
};
return
{
count
,
dataList
,
pageCount
:
Math
.
ceil
(
count
/
10
)
};
}
}
export
async
function
outputPTPDataList
(
fuHuaQiName
:
string
,
isCreatePTP
:
number
,
isParticipateInPTP
:
number
,
type
:
number
)
{
export
async
function
outputPTPDataList
(
fuHuaQiName
:
string
,
isCreatePTP
:
number
,
isParticipateInPTP
:
number
,
type
:
number
)
{
let
name
=
"全部"
;
let
name
=
"全部"
;
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
...
...
src/biz/admin/fuHuaQi/task.ts
View file @
b271f11c
...
@@ -190,7 +190,7 @@ export async function quarterTaskList(state:number, year:number, quarter:number,
...
@@ -190,7 +190,7 @@ export async function quarterTaskList(state:number, year:number, quarter:number,
if
(
state
==
2
)
{
//提交
if
(
state
==
2
)
{
//提交
selectParam
.
draftLock
=
true
;
selectParam
.
draftLock
=
true
;
}
else
{
//未提交
}
else
if
(
state
==
3
)
{
//未提交
selectParam
.
draftLock
=
false
;
selectParam
.
draftLock
=
false
;
}
}
if
(
year
)
selectParam
.
year
=
year
;
if
(
year
)
selectParam
.
year
=
year
;
...
@@ -237,7 +237,7 @@ export async function outPutQuarterTaskDataList(type:number, state:number, year:
...
@@ -237,7 +237,7 @@ export async function outPutQuarterTaskDataList(type:number, state:number, year:
name
=
"当前"
;
name
=
"当前"
;
if
(
state
==
2
)
{
//提交
if
(
state
==
2
)
{
//提交
selectParam
.
draftLock
=
true
;
selectParam
.
draftLock
=
true
;
}
else
{
//未提交
}
else
if
(
state
==
3
)
{
//未提交
selectParam
.
draftLock
=
false
;
selectParam
.
draftLock
=
false
;
}
}
if
(
year
)
selectParam
.
year
=
year
;
if
(
year
)
selectParam
.
year
=
year
;
...
...
src/biz/admin/provide.ts
View file @
b271f11c
...
@@ -8,7 +8,7 @@ import * as taskData from "../../data/fuHuaQi/monthTask/task";
...
@@ -8,7 +8,7 @@ import * as taskData from "../../data/fuHuaQi/monthTask/task";
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
*
as
enterpriseData
from
"../../data/enterprise/enterprise"
;
import
*
as
fuhuaqiData
from
"../../data/fuHuaQi/fuhuaqi"
;
import
*
as
fuhuaqiData
from
"../../data/fuHuaQi/fuhuaqi"
;
import
*
as
financingData
from
"../../data/fuHuaQi/monthTask/financing"
;
import
*
as
financingData
from
"../../data/fuHuaQi/monthTask/financing"
;
import
{
CHANGEMODE
,
FUHUASTATE
,
INDUSTRY
,
SCOREWAYS
,
TASKTYPEENUM
}
from
"../../config/enum"
;
import
{
CHANGEMODE
,
FUHUASTATE
,
INDUSTRY
,
LISTINGSITUATION
,
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"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
...
@@ -20,6 +20,8 @@ import * as scoreLogData from "../../data/fuHuaQi/scoreLog";
...
@@ -20,6 +20,8 @@ import * as scoreLogData from "../../data/fuHuaQi/scoreLog";
import
{
ScoreConfig
}
from
"../../config/scoreConfig"
;
import
{
ScoreConfig
}
from
"../../config/scoreConfig"
;
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
*
as
sysTools
from
"../../tools/system"
;
import
*
as
sysTools
from
"../../tools/system"
;
import
{
findFuHuaQiScoreInfo_repair
,
initFuHuaQiScore_repair
}
from
"../../data/fuHuaQi/scoreRepair"
;
import
{
addMany_repair
,
getAllLog_repair
}
from
"../../data/fuHuaQi/scoreLogRepair"
;
const
xlsx
=
require
(
'node-xlsx'
);
const
xlsx
=
require
(
'node-xlsx'
);
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
...
@@ -488,3 +490,250 @@ export async function addFinancingIndustry() {
...
@@ -488,3 +490,250 @@ export async function addFinancingIndustry() {
console
.
log
(
"补全融资领域成功"
,
dataList
.
length
);
console
.
log
(
"补全融资领域成功"
,
dataList
.
length
);
return
{}
return
{}
}
}
export
async
function
addBussiness
()
{
let
{
sheetMap
}
=
getExcel
(
path
.
join
(
__dirname
.
substring
(
0
,
__dirname
.
indexOf
(
"out"
)),
"res"
,
'企业经营数据底库数据.xlsx'
));
let
sheetDataList
=
sheetMap
[
"Sheet1"
];
let
dataList
=
[];
let
distinctMap
=
{};
sheetDataList
.
forEach
(
(
subList
,
index
)
=>
{
if
(
!
index
)
return
;
let
year
=
subList
[
1
].
split
(
'/'
)[
0
]
?
parseInt
(
subList
[
1
].
split
(
'/'
)[
0
])
:
0
;
let
quarter
=
subList
[
1
].
split
(
'/'
)[
1
]
?
parseInt
(
subList
[
1
].
split
(
'/'
)[
1
])
:
0
;
let
beOnTheMarket
=
[];
//上市情况
let
isBeOnTheMarket
=
false
;
if
(
subList
[
9
]
==
"是"
||
subList
[
10
]
==
"是"
||
subList
[
11
]
==
"是"
)
{
beOnTheMarket
.
push
(
LISTINGSITUATION
.
科创板
);
isBeOnTheMarket
=
true
;
}
if
(
subList
[
12
]
==
"是"
)
{
beOnTheMarket
.
push
(
LISTINGSITUATION
.
A
股
);
isBeOnTheMarket
=
true
;
}
if
(
subList
[
13
]
==
"是"
)
{
beOnTheMarket
.
push
(
LISTINGSITUATION
.
海外
);
isBeOnTheMarket
=
true
;
}
dataList
.
push
({
fuHuaQiName
:
subList
[
0
],
year
,
quarter
,
name
:
subList
[
2
],
addfirst
:
subList
[
3
],
uscc
:
subList
[
4
],
BI
:
subList
[
5
],
//营业收入
RD
:
subList
[
6
],
//研发投入
TXP
:
subList
[
7
],
//纳税
beOnTheMarket
,
isBeOnTheMarket
});
if
(
!
distinctMap
[
subList
[
4
]])
distinctMap
[
subList
[
4
]]
=
0
;
distinctMap
[
subList
[
4
]]
+=
1
;
});
for
(
let
uscc
in
distinctMap
)
{
if
(
distinctMap
[
uscc
]
>
1
)
console
.
log
(
uscc
);
}
let
fuHuaQiNameMap
=
await
fuhuaqiData
.
findAllFuHuaQiOperationUsccMap
();
let
qxList
=
[];
for
(
let
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
let
{
fuHuaQiName
,
uscc
}
=
dataList
[
i
];
if
(
fuHuaQiName
==
"大得创同(上海)科技有限公司"
)
{
fuHuaQiName
=
`大得创同(上海)科技有限公司`
}
else
if
(
fuHuaQiName
.
indexOf
(
"上海京航创业孵化器管理有限公司"
)
>
-
1
)
{
fuHuaQiName
=
"上海京航创业孵化器管理有限公司"
}
else
if
(
fuHuaQiName
.
indexOf
(
"上海创智空间创业孵化器管理有限公司"
)
>
-
1
)
{
fuHuaQiName
=
"上海创智空间创业孵化器管理有限公司"
}
else
if
(
fuHuaQiName
.
indexOf
(
"上海祖率创业孵化器管理有限公司"
)
>
-
1
)
{
fuHuaQiName
=
"上海祖率创业孵化器管理有限公司"
}
else
if
(
fuHuaQiName
==
"上海纳贤创业孵化器经营管理有限公司"
)
{
fuHuaQiName
=
"上海纳贤创业孵化器管理有限公司"
;
}
let
check
=
true
;
if
(
!
fuHuaQiNameMap
[
fuHuaQiName
])
check
=
false
;
let
enterpriseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
uscc
);
if
(
!
enterpriseInfo
||
!
enterpriseInfo
.
uscc
)
check
=
false
;
// else if (enterpriseInfo.qualification) {
// if (enterpriseInfo.qualification.isHighTech == true && isHighTech )
// }
// isHighTech:Boolean,
// highTechMs:Number,//高新技术
// isZjtx:Boolean,
// zjtxMs:Number,//专精特新
// isXjrpy:Boolean,
// xjrpyMs:Number,//小巨人培育
// isXjr:Boolean,
// xjrMs:Number,//小巨人
// beOnTheMarket:[Number],//上市情况
// isBeOnTheMarket:{type:Boolean, default:false}//是否上市
if
(
check
)
qxList
.
push
(
dataList
[
i
]);
}
return
{};
}
export
async
function
repairScore
()
{
let
data
=
await
findFuHuaQiList
({});
let
createMonthMap
=
{};
let
addList
=
[];
data
.
forEach
(
info
=>
{
addList
.
push
({
uscc
:
info
.
uscc
,
//孵化器uscc
startScore
:
400
,
//初始分 400 创建孵化器的时候要在这里加上
lastYearStar
:
3
,
//去年星值 这里默认是3星 每年12月31日12时,需要根据分算星然后更新到这里
myDataScore
:
0
,
//我的数据获得的分数
baseDataScore
:
0
,
//基础数据获得的分数
myEnterpriseScore
:
0
,
//我的企业获得的分数
taskScore
:
0
,
//任务获得分数
updateTime
:
new
Date
().
valueOf
(),
//更新时间戳
/**上一次评分 */
lastScore
:
0
//在获取列表的时候要同步数据
});
let
createMonth
=
!
info
.
createTime
?
0
:
new
Date
(
info
.
createTime
).
getMonth
();
createMonthMap
[
info
.
uscc
]
=
createMonth
;
});
await
initFuHuaQiScore_repair
(
addList
);
let
list
=
await
scoreLogData
.
getAllLog
();
list
.
sort
((
a
,
b
)
=>
{
return
a
.
timeMs
-
b
.
timeMs
});
let
initSortMap
=
{};
//格式 {uscc:{type:info }}
let
logMap
=
{};
//格式 {uscc:[]}
list
.
forEach
(
info
=>
{
let
{
uscc
,
ways
,
addScore
,
timeMs
}
=
info
;
if
(
ways
==
SCOREWAYS
.
任务得分
)
return
;
if
(
!
logMap
[
uscc
])
logMap
[
uscc
]
=
[];
logMap
[
uscc
].
push
({
ways
,
addScore
,
timeMs
});
if
(
!
initSortMap
[
uscc
])
initSortMap
[
uscc
]
=
{};
if
(
!
initSortMap
[
uscc
][
ways
])
initSortMap
[
uscc
][
ways
]
=
addScore
;
});
/**算任务分数 */
let
taskList
=
await
taskData
.
findTaskListByParam
({});
for
(
let
i
=
0
;
i
<
taskList
.
length
;
i
++
)
{
let
{
fuHuaQiUscc
,
isSubmit
,
type
,
month
,
year
,
submitTime
}
=
taskList
[
i
];
if
(
!
logMap
[
fuHuaQiUscc
])
logMap
[
fuHuaQiUscc
]
=
[];
let
addScore
=
0
;
if
(
isSubmit
)
addScore
=
getOnceTaskScore
(
createMonthMap
[
fuHuaQiUscc
]);
else
addScore
=
getOnceTaskDeductScore
(
createMonthMap
[
fuHuaQiUscc
]);
let
ms
=
0
;
if
(
isSubmit
)
ms
=
submitTime
;
else
{
ms
=
new
Date
(
`
${
year
}
-
${
month
+
2
}
-01 00:00:00`
).
valueOf
();
}
logMap
[
fuHuaQiUscc
].
push
({
taskType
:
type
,
ms
,
ways
:
SCOREWAYS
.
任务得分
,
addScore
});
}
/**排序算分 */
for
(
let
uscc
in
logMap
)
{
let
subList
=
logMap
[
uscc
];
subList
.
sort
(
(
a
,
b
)
=>
{
return
a
.
ms
-
b
.
ms
});
//按时间顺序排序
/**拼接该孵化器得分日志 */
let
myDataScore
=
0
;
//我的数据获得的分数
let
baseDataScore
=
0
;
//基础数据获得的分数
let
myEnterpriseScore
=
0
;
//我的企业获得的分数
let
taskScore
=
0
;
//任务获得分数
let
updateTime
=
0
//最后一次更新时间
let
thisNodeScore
=
400
;
let
sortLogs
=
[];
subList
.
forEach
(
info
=>
{
let
{
addScore
}
=
info
;
thisNodeScore
+=
addScore
;
let
changeMode
=
addScore
>
0
?
CHANGEMODE
.
增加
:
CHANGEMODE
.
减少
;
switch
(
info
.
ways
)
{
case
SCOREWAYS
.
任务得分
:
taskScore
+=
addScore
;
break
;
case
SCOREWAYS
.
我的企业数据
:
myEnterpriseScore
+=
addScore
;
break
;
case
SCOREWAYS
.
我的信息
:
baseDataScore
+=
addScore
;
break
;
case
SCOREWAYS
.
我的数据
:
myDataScore
+=
addScore
;
break
;
}
updateTime
=
info
.
ms
;
let
sortInfo
:
any
=
{
uscc
,
ways
:
info
.
ways
,
changeMode
,
score
:
thisNodeScore
,
addScore
:
addScore
,
timeMs
:
info
.
ms
}
if
(
info
.
taskType
)
sortInfo
.
taskType
=
info
.
taskType
;
sortLogs
.
push
(
sortInfo
);
});
//更新最后得分
let
sortDataInfo
=
await
findFuHuaQiScoreInfo_repair
(
uscc
);
sortDataInfo
.
myDataScore
=
myDataScore
;
sortDataInfo
.
baseDataScore
=
baseDataScore
;
sortDataInfo
.
myEnterpriseScore
=
myEnterpriseScore
;
sortDataInfo
.
taskScore
=
taskScore
;
sortDataInfo
.
updateTime
=
updateTime
;
sortDataInfo
.
lastScore
=
myDataScore
+
baseDataScore
+
myEnterpriseScore
+
taskScore
+
400
;
await
sortDataInfo
.
save
();
await
addMany_repair
(
sortLogs
);
console
.
log
(
"完成"
,
uscc
,
"的分数修复"
);
}
console
.
log
(
"完成全部分数数据修复"
);
}
export
async
function
changeScortData
()
{
let
logList
=
await
getAllLog_repair
();
let
addList
=
[];
logList
.
forEach
(
info
=>
{
let
addinfo
=
{
uscc
:
info
.
uscc
,
ways
:
info
.
ways
,
taskType
:
info
.
taskType
,
changeMode
:
info
.
changeMode
,
score
:
info
.
score
,
addScore
:
info
.
addScore
,
timeMs
:
info
.
timeMs
};
addList
.
push
(
addinfo
);
});
await
scoreLogData
.
addMany
(
addList
);
let
scoreList
=
await
scoreData
.
findScoreDataByParam
({});
for
(
let
i
=
0
;
i
<
scoreList
.
length
;
i
++
)
{
let
{
uscc
}
=
scoreList
[
i
];
let
sortDataInfo
=
await
scoreData
.
findFuHuaQiScoreInfo
(
uscc
);
sortDataInfo
.
myDataScore
=
sortDataInfo
.
myDataScore
;
sortDataInfo
.
baseDataScore
=
sortDataInfo
.
baseDataScore
;
sortDataInfo
.
myEnterpriseScore
=
sortDataInfo
.
myEnterpriseScore
;
sortDataInfo
.
taskScore
=
sortDataInfo
.
taskScore
;
sortDataInfo
.
updateTime
=
sortDataInfo
.
updateTime
;
sortDataInfo
.
lastScore
=
sortDataInfo
.
lastScore
;
await
sortDataInfo
.
save
();
}
console
.
log
(
"完成全部分数数据修复"
);
//todo 写完了,调接口
}
\ No newline at end of file
src/biz/admin/stats/guanWeiHui/fuhuaqiBase.ts
View file @
b271f11c
...
@@ -80,7 +80,7 @@ export async function fuHuaQiBaseData() {
...
@@ -80,7 +80,7 @@ export async function fuHuaQiBaseData() {
/**出租率趋势 */
/**出租率趋势 */
let
czlqsInfo
=
await
czlqs
();
let
czlqsInfo
=
await
czlqs
();
return
{
czlqsInfo
,
fhqpfpm
,
zcsjfb
,
jgxzfb
,
fhqjbfb
,
fhqlyfb
};
return
{
czlqsInfo
,
fhqpfpm
,
zcsjfb
,
jgxzfb
,
fhqjbfb
,
fhqlyfb
,
fuHuaQiCount
};
}
}
async
function
czlqs
()
{
async
function
czlqs
()
{
...
...
src/biz/mobileEnterprise/quarterTask/businessData.ts
View file @
b271f11c
...
@@ -140,6 +140,8 @@ export async function replenishBusinessData(uscc:string, type:number, data) {
...
@@ -140,6 +140,8 @@ export async function replenishBusinessData(uscc:string, type:number, data) {
await
replenishData
.
replenishData
(
uscc
,
lastYear
,
quarter
,
type
,
value
);
await
replenishData
.
replenishData
(
uscc
,
lastYear
,
quarter
,
type
,
value
);
}
}
/**加入埋点 */
/**加入埋点 */
if
(
Object
.
keys
(
checkMap
).
length
)
{
if
(
Object
.
keys
(
checkMap
).
length
)
{
let
pointId
;
let
pointId
;
...
...
src/config/splitResultConfig.ts
View file @
b271f11c
...
@@ -136,6 +136,7 @@ export const EnterpriseMoveOutListConfig = {
...
@@ -136,6 +136,7 @@ export const EnterpriseMoveOutListConfig = {
name
:{
key
:
"企业名称"
},
name
:{
key
:
"企业名称"
},
moveOutTime
:{
key
:
"迁出时间"
,
changeDate
:
true
},
moveOutTime
:{
key
:
"迁出时间"
,
changeDate
:
true
},
moveOutType
:{
key
:
"迁出类型"
},
moveOutType
:{
key
:
"迁出类型"
},
moveOutTrace
:{
key
:
"迁出去向"
},
moveOutCause
:{
key
:
"迁出原因"
},
moveOutCause
:{
key
:
"迁出原因"
},
fuHuaQiUscc
:{
key
:
"前所属孵化器"
},
fuHuaQiUscc
:{
key
:
"前所属孵化器"
},
industry
:{
key
:
"行业领域[] 最多 选择三个"
},
industry
:{
key
:
"行业领域[] 最多 选择三个"
},
...
...
src/data/enterprise/quarterTask/team.ts
View file @
b271f11c
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
import
{
Schema
}
from
'mongoose'
;
import
{
Schema
}
from
'mongoose'
;
import
{
baseDB
}
from
'../../../db/mongo/dbInit'
;
import
{
baseDB
}
from
'../../../db/mongo/dbInit'
;
import
{
BizError
}
from
'../../../util/bizError'
;
/**团队信息 */
/**团队信息 */
...
@@ -190,7 +191,7 @@ export async function statsEnterpriseTeamCountByNull(year:number, quarter:number
...
@@ -190,7 +191,7 @@ export async function statsEnterpriseTeamCountByNull(year:number, quarter:number
let
statsList
=
await
teamModel
.
aggregate
([
let
statsList
=
await
teamModel
.
aggregate
([
{
"$match"
:{
year
,
quarter
,
"$or"
:[{
isSubmit
:
true
},
{
fhqIsSubmit
:
true
}]
}},
{
"$match"
:{
year
,
quarter
,
"$or"
:[{
isSubmit
:
true
},
{
fhqIsSubmit
:
true
}]
}},
{
"$project"
:{
{
"$project"
:{
name
:
1
,
count
:
[
"$doctor"
,
"$master"
,
"$undergraduate"
,
"$juniorCollege"
,
"$other"
]
name
:
1
,
count
:
{
"$sum"
:[
"$doctor"
,
"$master"
,
"$undergraduate"
,
"$juniorCollege"
,
"$other"
]}
}},
}},
{
"$match"
:{
count
:
0
}},
{
"$match"
:{
count
:
0
}},
]);
]);
...
...
src/data/fuHuaQi/scoreLog.ts
View file @
b271f11c
...
@@ -87,3 +87,8 @@ export async function addLogTOInitData(uscc:string, ways:number, changeMode:numb
...
@@ -87,3 +87,8 @@ export async function addLogTOInitData(uscc:string, ways:number, changeMode:numb
if
(
taskType
)
addInfo
.
taskType
=
taskType
;
if
(
taskType
)
addInfo
.
taskType
=
taskType
;
await
fuHuaQiScoreLogModel
.
create
(
addInfo
);
await
fuHuaQiScoreLogModel
.
create
(
addInfo
);
}
}
export
async
function
getAllLog
()
{
return
await
fuHuaQiScoreLogModel
.
find
({
});
}
\ No newline at end of file
src/data/fuHuaQi/scoreLogRepair.ts
0 → 100644
View file @
b271f11c
/**
* 得分日志表
*
*
*/
import
{
Schema
}
from
'mongoose'
;
import
{
baseDB
}
from
'../../db/mongo/dbInit'
;
const
fuhuaqiscorelogRepairSchema
=
new
Schema
({
uscc
:{
type
:
String
,
index
:
true
},
//孵化器uscc
ways
:
Number
,
//途径 遵循枚举 SCOREWAYS 值
taskType
:
Number
,
//任务类型 遵循枚举 TASKTYPEENUM 值
changeMode
:
Number
,
//分数变化方式 遵循枚举 CHANGEMODE 值
score
:
Number
,
//变化后的分数
addScore
:
Number
,
//增加/减少的分数
timeMs
:{
type
:
Number
,
index
:
true
}
//获得时间 时间戳
});
var
fuhuaqiscorelogRepairModel
;
export
function
initModel
(){
fuhuaqiscorelogRepairModel
=
baseDB
.
model
(
'fuhuaqiscorelogRepair'
,
fuhuaqiscorelogRepairSchema
);
}
/**
* 批量添加得分日志
* @param addList 添加列表
*/
export
async
function
addMany_repair
(
addList
)
{
await
fuhuaqiscorelogRepairModel
.
insertMany
(
addList
);
}
export
async
function
getAllLog_repair
()
{
return
await
fuhuaqiscorelogRepairModel
.
find
({
});
}
\ No newline at end of file
src/data/fuHuaQi/scoreRepair.ts
0 → 100644
View file @
b271f11c
/**
* 得分表
* 记录孵化器分数
*
*/
import
{
Schema
}
from
'mongoose'
;
import
{
baseDB
}
from
'../../db/mongo/dbInit'
;
const
scoreRepairSchema
=
new
Schema
({
uscc
:{
type
:
String
,
index
:
true
},
//孵化器uscc
startScore
:{
type
:
Number
,
default
:
400
},
//初始分 400 创建孵化器的时候要在这里加上
lastYearStar
:{
type
:
Number
,
default
:
3
},
//去年星值 这里默认是3星 每年12月31日12时,需要根据分算星然后更新到这里
myDataScore
:{
type
:
Number
,
default
:
0
},
//我的数据获得的分数
baseDataScore
:{
type
:
Number
,
default
:
0
},
//基础数据获得的分数
myEnterpriseScore
:{
type
:
Number
,
default
:
0
},
//我的企业获得的分数
taskScore
:{
type
:
Number
,
default
:
0
},
//任务获得分数
updateTime
:{
type
:
Number
,
default
:
0
},
//更新时间戳
/**上一次评分 */
lastScore
:{
type
:
Number
,
default
:
0
}
//在获取列表的时候要同步数据
});
var
fuHuaQiScoreModel
;
export
function
initModel
(){
fuHuaQiScoreModel
=
baseDB
.
model
(
'fuhuaqiscoreRepair'
,
scoreRepairSchema
);
fuHuaQiScoreModel
.
selectOnceData
=
async
function
(
paramater
:
object
)
{
let
selectInfo
=
await
fuHuaQiScoreModel
.
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
);
});
}
/**数据维护 用于初始化老的数据 */
export
async
function
initFuHuaQiScore_repair
(
array
)
{
return
await
fuHuaQiScoreModel
.
insertMany
(
array
);
}
/**
* 查询孵化器分数信息
* @param uscc 孵化器统一信用代码
* @returns
*/
export
async
function
findFuHuaQiScoreInfo_repair
(
uscc
:
string
)
{
return
await
fuHuaQiScoreModel
.
selectOnceData
({
uscc
});
}
/**通过条件查询孵化器得分信息 */
export
async
function
findScoreDataByParam_repair
(
param
)
{
return
await
fuHuaQiScoreModel
.
find
(
param
);
}
\ No newline at end of file
src/db/mongo/tableInit.ts
View file @
b271f11c
...
@@ -25,6 +25,10 @@ import * as guanweihuiModel from "../../data/guanWeiHui/guanweihui";
...
@@ -25,6 +25,10 @@ import * as guanweihuiModel from "../../data/guanWeiHui/guanweihui";
import
*
as
informationModel
from
"../../data/guanWeiHui/information"
;
import
*
as
informationModel
from
"../../data/guanWeiHui/information"
;
import
*
as
dataMaintenanceLogModel
from
"../../data/guanWeiHui/dataMaintenanceLog"
;
import
*
as
dataMaintenanceLogModel
from
"../../data/guanWeiHui/dataMaintenanceLog"
;
/**测试 */
import
*
as
scoreRepairModel
from
"../../data/fuHuaQi/scoreRepair"
;
import
*
as
scoreLogRepairModel
from
"../../data/fuHuaQi/scoreLogRepair"
;
export
async
function
initTable
()
{
export
async
function
initTable
()
{
taskinModel
.
initModel
();
taskinModel
.
initModel
();
...
@@ -52,4 +56,8 @@ export async function initTable() {
...
@@ -52,4 +56,8 @@ export async function initTable() {
fuHuaQiQuarterTaskModel
.
initModel
();
fuHuaQiQuarterTaskModel
.
initModel
();
dataMaintenanceLogModel
.
initModel
();
dataMaintenanceLogModel
.
initModel
();
scoreRepairModel
.
initModel
();
scoreLogRepairModel
.
initModel
();
}
}
\ No newline at end of file
src/routers/provide.ts
View file @
b271f11c
...
@@ -28,6 +28,11 @@ export function setRouter(httpServer) {
...
@@ -28,6 +28,11 @@ export function setRouter(httpServer) {
/**4.2 */
/**4.2 */
httpServer
.
post
(
'/admin/provide/enterprise/financing/industry'
,
checkInterior
,
asyncHandler
(
addFinancingIndustry
)
);
httpServer
.
post
(
'/admin/provide/enterprise/financing/industry'
,
checkInterior
,
asyncHandler
(
addFinancingIndustry
)
);
/**4.3 */
// httpServer.post('/admin/provide/enterprise/bussiness/rep', checkInterior, asyncHandler(addBussinessData) );
httpServer
.
post
(
'/admin/provide/fuhuaqi/scort/repair'
,
checkInterior
,
asyncHandler
(
repairScoreData
)
);
httpServer
.
post
(
'/admin/provide/fuhuaqi/scort/change'
,
checkInterior
,
asyncHandler
(
repairChangeScortData
)
);
}
}
...
@@ -115,3 +120,21 @@ async function addFinancingIndustry(req, res) {
...
@@ -115,3 +120,21 @@ async function addFinancingIndustry(req, res) {
await
provideBiz
.
addFinancingIndustry
();
await
provideBiz
.
addFinancingIndustry
();
res
.
success
({
isUsccess
:
true
});
res
.
success
({
isUsccess
:
true
});
}
}
/**未定 */
async
function
addBussinessData
(
req
,
res
)
{
await
provideBiz
.
addBussiness
();
res
.
success
({
isUsccess
:
true
});
}
async
function
repairScoreData
(
req
,
res
)
{
await
provideBiz
.
repairScore
();
res
.
success
({
isUsccess
:
true
});
}
async
function
repairChangeScortData
(
req
,
res
)
{
await
provideBiz
.
changeScortData
();
res
.
success
({
isUsccess
:
true
});
}
\ No newline at end of file
src/util/analysisExcel.ts
View file @
b271f11c
...
@@ -9,7 +9,7 @@ const path = require('path');
...
@@ -9,7 +9,7 @@ const path = require('path');
*/
*/
export
function
onceSheetBecomeOfblockData
(
fileName
,
sheetName
)
{
export
function
onceSheetBecomeOfblockData
(
fileName
,
sheetName
)
{
let
{
sheetMap
}
=
getExcel
(
path
.
join
(
__dirname
.
substring
(
0
,
__dirname
.
indexOf
(
"out"
)),
"res"
,
fileName
));
let
{
sheetMap
}
=
getExcel
(
path
.
join
(
__dirname
.
substring
(
0
,
__dirname
.
indexOf
(
"out"
)),
"res"
,
fileName
));
return
sheetMap
;
//
return sheetMap;
let
thisBlockData
=
getBlockData
(
sheetMap
[
sheetName
]);
let
thisBlockData
=
getBlockData
(
sheetMap
[
sheetName
]);
return
thisBlockData
;
return
thisBlockData
;
}
}
...
...
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