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
0a956982
Commit
0a956982
authored
Apr 23, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
e3b2bb56
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
63 additions
and
35 deletions
+63
-35
fuHuaQi.ts
src/biz/admin/fuHuaQi/fuHuaQi.ts
+7
-1
provide.ts
src/biz/admin/provide.ts
+0
-0
operate.ts
src/biz/admin/stats/fuHuaQi/operate.ts
+5
-5
valueAnalysis.ts
src/biz/admin/stats/fuHuaQi/valueAnalysis.ts
+3
-3
indicatorPool.ts
src/biz/gpt/indicatorPool.ts
+4
-4
report.ts
src/biz/gpt/report.ts
+2
-3
policy.ts
src/biz/mobileEnterprise/policy.ts
+0
-2
myEnterprise.ts
src/biz/mobileFuHuaQi/enterprise/myEnterprise.ts
+2
-2
base.ts
src/biz/mobileFuHuaQi/fuHuaQi/base.ts
+3
-1
systemTask.ts
src/biz/systemTask.ts
+8
-8
fuHuaQi.ts
src/config/eccParam/fuHuaQi.ts
+2
-0
splitResultConfig.ts
src/config/splitResultConfig.ts
+3
-1
enterprise.ts
src/data/enterprise/enterprise.ts
+1
-1
fuhuaqi.ts
src/data/fuHuaQi/fuhuaqi.ts
+5
-0
zjBeyondLayout.ts
src/data/fuHuaQi/instituQualify/zjBeyondLayout.ts
+1
-2
dbInit.ts
src/db/mongo/dbInit.ts
+1
-0
main.ts
src/main.ts
+0
-2
provide.ts
src/routers/provide.ts
+15
-0
dataInit.ts
src/tools/dataInit.ts
+1
-0
No files found.
src/biz/admin/fuHuaQi/fuHuaQi.ts
View file @
0a956982
...
...
@@ -85,6 +85,7 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
changeData
.
zaiFuEnterpriseNum
=
changeData
.
shiTiEnterpriseNum
+
changeData
.
virtualEnterpriseNum
;
//在孵
let
outEnterpriseNum
=
changeData
.
enterpriseTotal
-
changeData
.
zaiFuEnterpriseNum
;
changeData
.
outEnterpriseNum
=
outEnterpriseNum
<
0
?
0
:
outEnterpriseNum
;
//迁出
/**备案地址转换 */
...
...
@@ -106,7 +107,9 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
changeData
.
industry
=
changeEnumValue
(
configEnum
.
FUHUAINDUSTRY
,
changeData
.
industry
);
changeData
.
institutionalNature
=
changeEnumValue
(
configEnum
.
INSTITUTIONALNATURE
,
changeData
.
institutionalNature
);
changeData
.
operationModel
=
changeEnumValue
(
configEnum
.
OPERATIONMODEL
,
changeData
.
operationModel
);
changeData
.
fuHuaLianXiDiZhi
=
changeAddToString
(
info
.
fuHuaLianXiDiZhi
);
changeData
.
fuHuazhuCeDiZhi
=
changeAddToString
(
info
.
fuHuazhuCeDiZhi
);
changeData
.
foundingTeamStr
=
changeData
.
foundingTeamType
?
changeEnumValue
(
configEnum
.
TEAM
,
changeData
.
foundingTeamType
)
:
"无"
;
let
foundingTeam
=
[];
if
(
changeData
.
foundingTeam
&&
changeData
.
foundingTeam
.
length
)
{
...
...
@@ -123,6 +126,9 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
changeData
.
foundingTeam
=
foundingTeam
;
}
changeData
.
ruZhuFeiFuHuaQiYe
=
0
;
//入住非孵化企业
changeData
.
caiLiHuGuanDiZhi
=
"-"
;
//财力互管地址
dataList
.
push
(
changeData
);
});
...
...
src/biz/admin/provide.ts
View file @
0a956982
This diff is collapsed.
Click to expand it.
src/biz/admin/stats/fuHuaQi/operate.ts
View file @
0a956982
...
...
@@ -44,11 +44,11 @@ export async function fuHuaQiOperateStats(uscc:string, year:number) {
czlbhqs
.
dataList
.
push
(
occupancyRate
);
});
//
let zfqyqs = await getFuHuaQiOwnEnterpriseCountStats(uscc, year);
let
zfqyqs
=
await
newGetFuHuaQiEnterpriseCountStats
(
uscc
,
year
);
//todo 测试代码
let
zfqyqs
=
await
getFuHuaQiOwnEnterpriseCountStats
(
uscc
,
year
);
//
let zfqyqs = await newGetFuHuaQiEnterpriseCountStats(uscc, year); //todo 测试代码
//
let byqyslbhqs = await getFuHuaQiOwnEnterpriseGraduateCountStats(uscc, year);
let
byqyslbhqs
=
await
newGetFuHuaQiEnterpriseGraduateCountStats
(
uscc
,
year
);
//todo 测试代码
let
byqyslbhqs
=
await
getFuHuaQiOwnEnterpriseGraduateCountStats
(
uscc
,
year
);
//
let byqyslbhqs = await newGetFuHuaQiEnterpriseGraduateCountStats(uscc, year);//todo 测试代码
let
enterpriseIndustryList
=
await
getEnterpriseIndustry
(
uscc
,
year
);
...
...
@@ -121,6 +121,7 @@ async function getFuHuaQiOwnEnterpriseCountStats(uscc:string, year:number) {
/**按时间从小到大 */
dataList
.
sort
((
a
,
b
)
=>
{
return
a
.
ct
-
b
.
ct
});
let
xnData
=
[];
let
stData
=
[];
let
monthData
=
[];
...
...
@@ -215,7 +216,6 @@ async function newGetFuHuaQiEnterpriseGraduateCountStats(uscc:string, year:numbe
let
dataList
=
[];
for
(
let
i
=
12
;
i
>=
1
;
i
--
)
{
if
(
i
>=
thisMonth
)
continue
;
dataList
.
push
({
nby
:
0
,
by
:
outMap
[
i
]
||
0
,
...
...
src/biz/admin/stats/fuHuaQi/valueAnalysis.ts
View file @
0a956982
...
...
@@ -89,11 +89,11 @@ export async function getValueStats(uscc) {
for
(
let
i
=
1
;
i
<=
6
;
i
++
)
{
let
itemDate
=
moment
().
subtract
(
i
,
'months'
);
let
key
=
itemDate
.
format
(
"YYYY-MM"
);
let
selectMonth
=
itemDate
.
month
();
let
selectMonth
=
itemDate
.
month
()
+
1
;
let
selectYear
=
itemDate
.
year
();
let
{
isSubmit
}
=
await
findOneFuHuaQiMonthTaskData
({
fuHuaQiUscc
:
uscc
,
type
:
TASKTYPEENUM
.
融资企业填报
,
month
:
selectMonth
,
year
:
selectYear
});
let
itemData
=
await
findOneFuHuaQiMonthTaskData
({
fuHuaQiUscc
:
uscc
,
type
:
TASKTYPEENUM
.
融资企业填报
,
month
:
selectMonth
,
year
:
selectYear
});
let
ms
=
moment
().
subtract
(
i
,
'months'
).
valueOf
();
financingMap
[
key
]
=
{
ms
,
key
,
data
:{},
fuHuaQiSubmit
:
isSubmit
==
true
};
financingMap
[
key
]
=
{
ms
,
key
,
data
:{},
fuHuaQiSubmit
:
i
temData
.
i
sSubmit
==
true
};
}
financingData
.
forEach
(
info
=>
{
...
...
src/biz/gpt/indicatorPool.ts
View file @
0a956982
...
...
@@ -212,10 +212,10 @@ export async function initPool() {
/**企业资质 */
let
enterpriseQualificationInfo
:
any
=
await
statsEnterpriseQualification
();
indicatiorPoolQuerery
[
TARGET
.
企业资质占比
]
=
{
type
:
"Map"
,
value
:{
"高新技术企业"
:
enterpriseQualificationInfo
.
isHighTech
Map
,
"专精特新企业"
:
enterpriseQualificationInfo
.
isZjtx
Map
,
"小巨人培育企业"
:
enterpriseQualificationInfo
.
isXjrpy
Map
,
"小巨人企业"
:
enterpriseQualificationInfo
.
isXjr
Map
"高新技术企业"
:
enterpriseQualificationInfo
.
isHighTech
,
"专精特新企业"
:
enterpriseQualificationInfo
.
isZjtx
,
"小巨人培育企业"
:
enterpriseQualificationInfo
.
isXjrpy
,
"小巨人企业"
:
enterpriseQualificationInfo
.
isXjr
}};
let
enterpriseIntellectualInfo
=
await
statsEnterpriseIntellectualPropertyInfo
();
indicatiorPoolQuerery
[
TARGET
.
企业专利占比
]
=
{
type
:
"Map"
,
value
:
enterpriseIntellectualInfo
};
...
...
src/biz/gpt/report.ts
View file @
0a956982
...
...
@@ -31,7 +31,7 @@ export async function initOutline() {
*/
export
async
function
generateReport
()
{
return
{
fileName
:
"2023年采集数据分析.docx"
,
size
:
'17kb'
,
url
:
'/doc/2023年采集数据分析.docx'
};
//
return {fileName:"2023年采集数据分析.docx", size:'17kb', url:'/doc/2023年采集数据分析.docx'};
let
docx
=
officegen
(
'docx'
);
let
pObj
=
docx
.
createP
();
...
...
@@ -57,7 +57,7 @@ export async function generateReport() {
context
=
context
||
[];
let
chartStr
:
any
=
await
checkMsg
(
msg
,
context
);
if
(
removeParagraph
)
{
if
(
removeParagraph
&&
chartStr
)
{
let
rmvList
=
chartStr
.
split
(
'
\
n'
);
let
rmvStr
=
``
;
rmvList
.
forEach
(
itemStr
=>
{
rmvStr
+=
itemStr
});
...
...
@@ -132,4 +132,3 @@ function enterpriseCombinationMessage() {
return
str
;
}
src/biz/mobileEnterprise/policy.ts
View file @
0a956982
...
...
@@ -8,8 +8,6 @@ import { addEnterprisePoint } from "../point";
import
{
ENTERPRISENODEENUM
,
POINTTYPEENUM
}
from
"../../config/pointConfig"
;
/**
* 获取资讯列表
*
...
...
src/biz/mobileFuHuaQi/enterprise/myEnterprise.ts
View file @
0a956982
...
...
@@ -236,8 +236,8 @@ export async function updateMoveOutInfo(fuHuaQiUscc:string, uscc:string, moveOu
//选择了 非企业注销时 moveOutTrace 和 moveOutCause 为必选项
await
eccReqParamater
({
moveOutTrace
:
"Number"
,
moveOutCause
:
"[Number]"
},
{
moveOutTrace
,
moveOutCause
}
);
/**校验moveOutCause 和 moveOutTrace 是否符合规则*/
verificationEnumTools
.
eccEnumValue
(
'修改企业孵化状态'
,
'
修改为迁出
'
,
configEnum
.
MOVEOUTTRACE
,
moveOutTrace
);
verificationEnumTools
.
eccEnumValue
(
'修改企业孵化状态'
,
'
修改为迁出
'
,
configEnum
.
MOVEOUTCAUSE
,
moveOutCause
);
verificationEnumTools
.
eccEnumValue
(
'修改企业孵化状态'
,
'
迁出去向
'
,
configEnum
.
MOVEOUTTRACE
,
moveOutTrace
);
verificationEnumTools
.
eccEnumValue
(
'修改企业孵化状态'
,
'
迁出原因
'
,
configEnum
.
MOVEOUTCAUSE
,
moveOutCause
);
/**根据 不同的迁出类型 校验不同的迁出原因枚举 */
if
(
moveOutType
==
configEnum
.
MOVEOUTTYPE
.
毕业迁出
)
{
moveOutCause
=
[
moveOutCause
[
0
]];
//非毕业迁出是单选
...
...
src/biz/mobileFuHuaQi/fuHuaQi/base.ts
View file @
0a956982
...
...
@@ -65,6 +65,8 @@ export async function selectFuHuaQiBaseData(uscc:string) {
data
.
fuHuaEnterpriseTotal
=
dataBaseInfo
.
fuHuaEnterpriseTotal
?
dataBaseInfo
.
fuHuaEnterpriseTotal
:
0
;
data
.
fuHuaEnterpriseTotal
+=
await
enterpriseData
.
findEnterpriseTotalByFuHuaQiUscc
(
uscc
);
data
.
ruZhuFeiFuHuaQiYe
=
0
;
return
data
;
}
...
...
@@ -141,7 +143,7 @@ export async function updateFuHuaQiBaseData(uscc:string, param) {
for
(
let
i
=
0
;
i
<
changeList
.
length
;
i
++
)
{
let
key
=
changeList
[
i
];
if
(
key
==
"virtualEnterpriseNum"
)
continue
;
//加埋点
switch
(
key
)
{
case
"acreageTotal"
:
if
(
param
[
key
]
!=
baseDataInfo
[
key
])
{
...
...
src/biz/systemTask.ts
View file @
0a956982
...
...
@@ -32,16 +32,16 @@ export function initSystemTask() {
},
3600
*
1000
);
/**孵化器季度任务 */
fuHuaQiQuarterTask
();
setInterval
(
async
function
()
{
await
fuHuaQiQuarterTask
();
},
3600
*
1000
*
2
);
//
fuHuaQiQuarterTask();
//
setInterval(async function () {
//
await fuHuaQiQuarterTask();
//
}, 3600 * 1000 * 2);
/**企业季度任务 */
enterpriseQuarterTask
();
setInterval
(
async
function
()
{
await
enterpriseQuarterTask
();
},
3600
*
1000
*
2
);
//
enterpriseQuarterTask();
//
setInterval(async function () {
//
await enterpriseQuarterTask();
//
}, 3600 * 1000 * 2);
/**初始化短信任务 */
...
...
src/config/eccParam/fuHuaQi.ts
View file @
0a956982
...
...
@@ -18,6 +18,8 @@ export const BaseParamUpdateConfig = {
acreageTotal
:{
type
:
"Number"
,
notMustHave
:
true
},
//孵化器总面积(㎡)
acreagePersonalUse
:{
type
:
"Number"
,
notMustHave
:
true
},
//孵化器自用面积(㎡)
hatchingGround
:{
type
:
"[Object]"
,
notMustHave
:
true
},
//经备案孵化场地
fuHuaLianXiDiZhi
:{
type
:
"Address"
,
notMustHave
:
true
},
//孵化联系地址
fuHuazhuCeDiZhi
:{
type
:
"Address"
,
notMustHave
:
true
},
//孵化注册地址
// isProfessionalTechnology:{type:"Boolean", notMustHave:true},//是否专业技术平台
// professionalTechnologyName:{type:"String", notMustHave:true},//专业技术平台名称
// professionalTechnologyCreateTime:{type:"Number", notMustHave:true},//时间 年份 xxxx年01月01日 的时间戳
...
...
src/config/splitResultConfig.ts
View file @
0a956982
...
...
@@ -238,7 +238,9 @@ export const FuHuaQiBaseDataConfig = {
// professionalTechnologyAmount:{key:"专业技术平台投资金额"},
// isCooperation:{key:"是否与第三方机构合作"},
// cooperationInstitutions:{key:"合作机构名称"},
enterpriseTotal
:{
key
:
"累计企业"
}
enterpriseTotal
:{
key
:
"累计企业"
},
fuHuazhuCeDiZhi
:{
key
:
"孵化注册地址"
},
fuHuaLianXiDiZhi
:{
key
:
"孵化联系地址"
}
}
...
...
src/data/enterprise/enterprise.ts
View file @
0a956982
...
...
@@ -46,7 +46,7 @@ const enterpriseSchema = new Schema({
name
:
{
type
:
String
,
index
:
true
},
//企业名称
taskId
:{
type
:
String
,
index
:
true
},
//绑定的任务id
uscc
:{
type
:
String
,
index
:
true
},
//统一信用代码
fuHuaQiUscc
:{
type
:
String
,
index
:
true
},
//孵化器统一信用代码
fuHuaQiUscc
:{
type
:
String
,
index
:
true
},
//孵化器统一信用代码
[-p---------------------------------------------]
industry
:[
Number
],
//领域
logonTime
:
Number
,
//注册时间
firstIncubationTime
:
Number
,
//首次入孵时间
...
...
src/data/fuHuaQi/fuhuaqi.ts
View file @
0a956982
...
...
@@ -9,6 +9,7 @@
import
{
Schema
}
from
'mongoose'
;
import
{
baseDB
}
from
'../../db/mongo/dbInit'
;
import
{
deflate
}
from
'zlib'
;
const
foundingTeamSchema
=
new
Schema
({
memberName
:
String
,
//成员姓名
...
...
@@ -77,6 +78,10 @@ const fuHuaQiSchema = new Schema({
professionalTechnologyAmount
:
Number
,
//投资金额 万元
isCooperation
:{
type
:
Boolean
,
default
:
false
},
//是否与第三方合作
cooperationInstitutions
:{
type
:
String
,
default
:
""
},
//合作机构名称
/**2024年04月23日字段 */
fuHuazhuCeDiZhi
:{
type
:[
String
],
default
:[]},
//孵化注册地址
fuHuaLianXiDiZhi
:{
type
:[
String
],
default
:[]},
//孵化联系地址
});
var
fuHuaQiModel
;
...
...
src/data/fuHuaQi/instituQualify/zjBeyondLayout.ts
View file @
0a956982
...
...
@@ -99,4 +99,4 @@ export async function findZjBeyondLayoutListByParamToPage(param, skipCount:numbe
*/
export
async
function
getZjBeyondLayoutCountByParam
(
param
)
{
return
await
zjBeyondLayoutModel
.
find
(
param
).
countDocuments
();
}
\ No newline at end of file
}
src/db/mongo/dbInit.ts
View file @
0a956982
...
...
@@ -9,6 +9,7 @@ var baseDB;
export
async
function
initDB
()
{
//如果配置了mongoServerConstVal 才会连接mongo
if
(
systemConfig
.
mongodbStr
)
{
console
.
log
(
systemConfig
.
mongodbStr
);
baseDB
=
await
createDbConnect
(
systemConfig
.
mongodbStr
).
catch
(
err
=>
{
throw
err
});
...
...
src/main.ts
View file @
0a956982
...
...
@@ -30,5 +30,4 @@ async function lanuch() {
lanuch
();
\ No newline at end of file
src/routers/provide.ts
View file @
0a956982
...
...
@@ -42,6 +42,10 @@ export function setRouter(httpServer) {
/**修复任务分数 */
httpServer
.
post
(
'/admin/provide/fuhuaqi/scort/correcttask'
,
checkInterior
,
asyncHandler
(
correctFuHuaQiScore
)
);
httpServer
.
post
(
'/admin/provide/fuhuaqi/scort/correctmyenterprise'
,
checkInterior
,
asyncHandler
(
correctFuHuaQiMyEnterpriseScore
)
);
//批量操作
httpServer
.
post
(
'/admin/provide/fuhuaqi/scort/enterpriseoutanin'
,
checkInterior
,
asyncHandler
(
enterpriseOutAnInRot
)
);
httpServer
.
post
(
'/admin/provide/fuhuaqi/scort/enterpriseoutandinmoverout'
,
checkInterior
,
asyncHandler
(
enterpriseOutAndInMoverOutRot
)
);
}
...
...
@@ -170,3 +174,14 @@ async function correctFuHuaQiMyEnterpriseScore(req, res) {
await
provideBiz
.
correctFuHuaQiMyEnterpriseScoreData
();
res
.
success
({
isUsccess
:
true
});
}
async
function
enterpriseOutAnInRot
(
req
,
res
)
{
await
provideBiz
.
enterpriseOutAnIn
();
res
.
success
({
isUsccess
:
true
});
}
async
function
enterpriseOutAndInMoverOutRot
(
req
,
res
)
{
await
provideBiz
.
enterpriseOutAndInMoverOut
();
res
.
success
({
isUsccess
:
true
});
}
src/tools/dataInit.ts
View file @
0a956982
...
...
@@ -13,6 +13,7 @@ import * as taskTool from "./taskTool";
const
xlsx
=
require
(
'node-xlsx'
);
const
path
=
require
(
'path'
);
const
md5
=
require
(
"md5"
);
const
fs
=
require
(
'fs'
);
const
OldTypeChangeConfig
=
{
"文化创意"
:
INDUSTRY
.
文化创意
,
...
...
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