Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyiAdminServer
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
yuyiAdminServer
Commits
6b0e04e8
Commit
6b0e04e8
authored
May 15, 2025
by
Zllgogo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
36456682
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
357 additions
and
104 deletions
+357
-104
fuhua.ts
src/biz/fuhua.ts
+85
-20
ruFu.ts
src/biz/ruFu.ts
+21
-18
userRuFu.ts
src/biz/userRuFu.ts
+32
-9
zaiFu.ts
src/biz/zaiFu.ts
+187
-50
enterprise.ts
src/config/eccParam/enterprise.ts
+3
-3
enum.ts
src/config/enum/enum.ts
+1
-0
main.ts
src/main.ts
+2
-0
admin.ts
src/routers/admin.ts
+4
-4
dbinit.ts
src/routers/dbinit.ts
+22
-0
No files found.
src/biz/fuhua.ts
View file @
6b0e04e8
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
OPERATIONALDATATYPE
,
TABLEID
,
TABLENAME
}
from
"../config/enum/dbEnum"
;
import
{
OPERATIONALDATATYPE
,
TABLEID
,
TABLENAME
}
from
"../config/enum/dbEnum"
;
import
{
BUILDING
,
CHANGETYPE
,
EMIGRATIONTYPE
,
FUHUASTATE
,
INCOME
,
INDUSTRY
,
OFFLINEPROMOTION
,
ONLINEPROMOTION
,
PROMOTIONTYPE
,
STATE
}
from
"../config/enum/enum"
;
import
{
BUILDING
,
CHANGETYPE
,
DEGREE
,
EMIGRATIONTYPE
,
FUHUASTATE
,
INCOME
,
INDUSTRY
,
OFFLINEPROMOTION
,
ONLINEPROMOTION
,
PROMOTIONTYPE
,
STATE
}
from
"../config/enum/enum"
;
import
{
operationalData
,
selectData
,
selectManyTableData
}
from
"../data/operationalData"
;
import
{
operationalData
,
selectData
,
selectManyTableData
}
from
"../data/operationalData"
;
import
{
getMySqlMs
,
randomId
}
from
"../tools/system"
;
import
{
getMySqlMs
,
randomId
}
from
"../tools/system"
;
import
{
changeEnumValue
}
from
"../util/verificationEnum"
;
import
{
changeEnumValue
}
from
"../util/verificationEnum"
;
...
@@ -308,8 +308,12 @@ export async function getOperateData(year) {
...
@@ -308,8 +308,12 @@ export async function getOperateData(year) {
"毕业企业数变化趋势"
:
{
"毕业企业数变化趋势"
:
{
"毕业企业"
:
[]
"毕业企业"
:
[]
},
},
"出租率变化趋势"
:
[],
// "出租率变化趋势": [],//换成在孵企业面积变化趋势
// "在孵企业面积变化趋势":{
// "在孵面积":[]
// },
"在孵企业行业领域"
:
[],
"在孵企业行业领域"
:
[],
"在孵企业学历分布"
:
[]
// "孵化器收入": []
// "孵化器收入": []
};
};
let
qushiConf
=
{
"01"
:
0
,
"02"
:
0
,
"03"
:
0
,
"04"
:
0
,
"05"
:
0
,
"06"
:
0
,
"07"
:
0
,
"08"
:
0
,
"09"
:
0
,
"10"
:
0
,
"11"
:
0
,
"12"
:
0
};
let
qushiConf
=
{
"01"
:
0
,
"02"
:
0
,
"03"
:
0
,
"04"
:
0
,
"05"
:
0
,
"06"
:
0
,
"07"
:
0
,
"08"
:
0
,
"09"
:
0
,
"10"
:
0
,
"11"
:
0
,
"12"
:
0
};
...
@@ -371,20 +375,17 @@ export async function getOperateData(year) {
...
@@ -371,20 +375,17 @@ export async function getOperateData(year) {
.
sort
((
a
,
b
)
=>
parseInt
(
a
.
key
)
-
parseInt
(
b
.
key
));
.
sort
((
a
,
b
)
=>
parseInt
(
a
.
key
)
-
parseInt
(
b
.
key
));
/**出租率 */
/**出租率 */
let
chuzulvParam
=
{
startTime
:{
"%lt%"
:
yearTime
},
endTime
:{
"%gt%"
:
yearTime
}};
// let chuzulvParam = {startTime:{"%lt%":yearTime}, endTime:{"%gt%":yearTime}};
// let chuzulvList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME., chuzulvParam);
// // let chuzulvList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME., chuzulvParam);
let
chuzulvInfo
=
qushiConf
;
// let chuzulvInfo = qushiConf;
for
(
let
key
in
chuzulvInfo
)
{
// for(let key in chuzulvInfo) {
operateData
.
出租率变化趋势
.
push
({
key
,
value
:
chuzulvInfo
[
key
].
toString
()});
// operateData.出租率变化趋势.push({key, value:chuzulvInfo[key].toString()});
}
// }
//X轴排序
// //X轴排序
operateData
.
出租率变化趋势
.
sort
(
(
a
,
b
)
=>
{
// operateData.出租率变化趋势.sort( (a, b) => {
return
a
.
key
-
b
.
key
;
// return a.key - b.key;
})
// })
/**在孵企业租赁面积 */
/**在孵企业行业领域 */
// let araeParam = { column: ["area", "unitPrice", "roomNumber", "rent"], where: {} };
let
araeParam
=
{
column
:
[
"area"
,
"building"
,
"roomNumber"
,
"rent"
],
where
:
{}
};
let
araeParam
=
{
column
:
[
"area"
,
"building"
,
"roomNumber"
,
"rent"
],
where
:
{}
};
let
zaifuTableInfo
:
any
=
{};
let
zaifuTableInfo
:
any
=
{};
zaifuTableInfo
[
TABLENAME
.
租赁信息
]
=
araeParam
;
zaifuTableInfo
[
TABLENAME
.
租赁信息
]
=
araeParam
;
...
@@ -392,8 +393,35 @@ export async function getOperateData(year) {
...
@@ -392,8 +393,35 @@ export async function getOperateData(year) {
column
:
[
"state"
,
"startTime"
,
"endTime"
],
column
:
[
"state"
,
"startTime"
,
"endTime"
],
where
:
{
startTime
:
{
"%lt%"
:
yearTime
},
endTime
:
{
"%gt%"
:
yearTime
},
state
:
{
"%notIn%"
:
FUHUASTATE
.
迁出
}
},
where
:
{
startTime
:
{
"%lt%"
:
yearTime
},
endTime
:
{
"%gt%"
:
yearTime
},
state
:
{
"%notIn%"
:
FUHUASTATE
.
迁出
}
},
};
};
// zaifuTableInfo[TABLENAME.参保记录] = { column: ["zhuanKe", "benKe", "shuoshi", "boShi", "boshiyishang", "qiTa"], where: {} };
let
zaifuResList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业基础信息表
,
{},
[
"eId"
,
"industry"
],
zaifuTableInfo
);
let
zaifuResList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业基础信息表
,
{},
[
"eId"
,
"industry"
],
zaifuTableInfo
);
// console.log("zaifuResList:", zaifuResList);
// // 新增:在孵企业面积变化趋势
// let zaifuAreaTrend = { ...qushiConf }; // 初始化每月累计面积为0
// zaifuResList.forEach(info => {
// info.enterprise_leases.forEach(lease => {
// let leaseEndTime = moment(lease.endTime);
// let year = leaseEndTime.format("YYYY");
// let month = leaseEndTime.format("MM");
// if (year === moment(yearTime).format("YYYY")) {
// zaifuAreaTrend[month] += parseFloat(lease.area);
// }
// });
// });
// // 转换为数组并排序
// for (let key in zaifuAreaTrend) {
// operateData.在孵企业面积变化趋势.在孵面积.push({ key, value: zaifuAreaTrend[key].toString() });
// }
// operateData.在孵企业面积变化趋势.在孵面积.sort((a, b) => parseInt(a.key) - parseInt(b.key));
/**在孵企业行业领域 */
// let araeParam = { column: ["area", "unitPrice", "roomNumber", "rent"], where: {} };
//将 industry 字符串转换为数组
//将 industry 字符串转换为数组
zaifuResList
.
forEach
(
info
=>
{
zaifuResList
.
forEach
(
info
=>
{
...
@@ -424,6 +452,31 @@ export async function getOperateData(year) {
...
@@ -424,6 +452,31 @@ export async function getOperateData(year) {
}
}
/**在孵企业学历分布(参保记录) */
let
educationDistribution
=
{};
for
(
let
key
in
DEGREE
)
{
if
(
!
isNaN
(
Number
(
key
)))
continue
;
// 跳过数字键
educationDistribution
[
key
]
=
0
;
}
let
canbaoYear
=
moment
(
yearTime
).
format
(
"YYYY"
);
let
canbaoList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
参保记录
,{
annual
:
canbaoYear
},
null
);
canbaoList
.
forEach
(
cb
=>
{
if
(
cb
.
zhuanKe
)
educationDistribution
[
"专科"
]
+=
parseInt
(
cb
.
zhuanKe
);
if
(
cb
.
benKe
)
educationDistribution
[
"本科"
]
+=
parseInt
(
cb
.
benKe
);
if
(
cb
.
shuoshi
)
educationDistribution
[
"硕士"
]
+=
parseInt
(
cb
.
shuoshi
);
if
(
cb
.
boShi
)
educationDistribution
[
"博士"
]
+=
parseInt
(
cb
.
boShi
);
if
(
cb
.
boshiyishang
)
educationDistribution
[
"博士以上"
]
+=
parseInt
(
cb
.
boshiyishang
);
if
(
cb
.
qiTa
)
educationDistribution
[
"其他"
]
+=
parseInt
(
cb
.
qiTa
);
});
// 转换为数组并推入 operateData
operateData
.
在孵企业学历分布
=
Object
.
entries
(
educationDistribution
).
map
(([
key
,
value
])
=>
({
key
,
value
:
value
.
toString
()
}));
// /**孵化器收入 */
// /**孵化器收入 */
// for (let key in INCOME) {
// for (let key in INCOME) {
// let anyKey: any = key;
// let anyKey: any = key;
...
@@ -755,12 +808,24 @@ export async function updateYuYi(yId, param) {
...
@@ -755,12 +808,24 @@ export async function updateYuYi(yId, param) {
for
(
let
key
in
promotionInfo
)
{
for
(
let
key
in
promotionInfo
)
{
for
(
let
app
in
promotionInfo
[
key
])
{
for
(
let
app
in
promotionInfo
[
key
])
{
let
updateInfo
=
{
promotionNum
:
promotionInfo
[
key
][
app
]};
let
updateInfo
=
{
promotionNum
:
promotionInfo
[
key
][
app
]};
let
updateParam
=
{
promotionType
:
key
,
promotionApp
:
app
}
let
updateParam
=
{
promotionType
:
PROMOTIONTYPE
[
key
],
promotionApp
:
promotionInfo
[
key
][
app
]}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
入驻信息表
,
updateInfo
,
updateParam
);
let
运营推广
dbInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
运营推广信息表
,
updateParam
,
[
"opId"
,
"promotionType"
,
"promotionApp"
,
"promotionNum"
]);
if
(
!
运营推广
dbInfo
||
!
运营推广
dbInfo
.
opId
)
{
let
addInfo
=
{
opId
:
randomId
(
TABLENAME
.
运营推广信息表
),
promotionType
:
updateParam
.
promotionType
,
promotionApp
:
updateParam
.
promotionApp
,
promotionNum
:
updateInfo
.
promotionNum
};
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
运营推广信息表
,
addInfo
,
{});
}
else
{
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
运营推广信息表
,
updateInfo
,
updateParam
);
}
}
}
}
}
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.入驻信息表, param, {info_enterId:yuyiInfo.info_enterId});
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.入驻信息表, param, {info_enterId:yuyiInfo.info_enterId});
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
运营推广信息表
,
param
,
{
opId
:
yuyiInfo
.
opId
});
//
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.运营推广信息表, param, {opId:yuyiInfo.opId});
return
{
isSuccess
:
true
};
return
{
isSuccess
:
true
};
}
}
...
...
src/biz/ruFu.ts
View file @
6b0e04e8
...
@@ -377,24 +377,7 @@ export async function enterpriseRegisterExamineList(enterpriseName, page) {
...
@@ -377,24 +377,7 @@ export async function enterpriseRegisterExamineList(enterpriseName, page) {
return
{
dataList
,
dataCount
:
allResList
.
length
};
return
{
dataList
,
dataCount
:
allResList
.
length
};
}
}
// 辅助函数:获取文件名和格式
// function getFileNameAndFormat(fileName: string | null | undefined): string {
// if (fileName === null || fileName === undefined || fileName === "未提交") {
// return "未提交";
// }
// // 提取文件名(去掉路径)
// const basename = fileName.split('/').pop() || fileName;
// // 分割文件名和格式
// const parts = basename.split('.');
// if (parts.length < 2) {
// return basename; // 如果没有找到 . 则直接返回原字符串
// }
// const name = parts.slice(0, -1).join('.');
// const format = parts.pop();
// return `${name}.${format}`;
// }
function
getFileNameAndFormat
(
fileName
:
string
|
null
|
undefined
):
string
{
function
getFileNameAndFormat
(
fileName
:
string
|
null
|
undefined
):
string
{
if
(
fileName
===
null
||
fileName
===
undefined
||
fileName
===
"未提交"
)
{
if
(
fileName
===
null
||
fileName
===
undefined
||
fileName
===
"未提交"
)
{
return
"未提交"
;
return
"未提交"
;
...
@@ -416,6 +399,26 @@ function getFileNameAndFormat(fileName: string | null | undefined): string {
...
@@ -416,6 +399,26 @@ function getFileNameAndFormat(fileName: string | null | undefined): string {
return
`
${
name
.
trim
()}
.
${
format
}
`
;
return
`
${
name
.
trim
()}
.
${
format
}
`
;
}
}
function
formatFileDisplay
(
fileName
:
string
|
null
|
undefined
):
string
{
if
(
!
fileName
||
fileName
===
"未提交"
)
return
"未提交"
;
const
{
name
,
ext
}
=
extractFileNameAndExt
(
fileName
);
return
`
${
name
.
trim
()}
.
${
ext
}
`
;
}
function
extractFileNameAndExt
(
fullName
:
string
)
{
const
baseName
=
fullName
.
split
(
'/'
).
pop
()
||
fullName
;
const
cleanName
=
baseName
.
replace
(
/
(\d{8}
_
\d{6})
/
,
''
);
// 移除时间戳
const
parts
=
cleanName
.
split
(
'.'
);
if
(
parts
.
length
<
2
)
{
return
{
name
:
cleanName
,
ext
:
''
};
}
const
ext
=
parts
.
pop
()
!
;
const
name
=
parts
.
join
(
'.'
);
return
{
name
,
ext
};
}
/**
/**
* 入孵材料审核通过
* 入孵材料审核通过
...
...
src/biz/userRuFu.ts
View file @
6b0e04e8
...
@@ -123,7 +123,6 @@ export async function createRuFu(uId, param) {
...
@@ -123,7 +123,6 @@ export async function createRuFu(uId, param) {
register
:
0
register
:
0
};
};
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业基础信息表
,
addEInfo
,
{});
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业基础信息表
,
addEInfo
,
{});
console
.
log
(
"addEInfo"
,
addEInfo
);
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业用户表
,
{
eId
:
addEInfo
.
eId
},
{
uId
});
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业用户表
,
{
eId
:
addEInfo
.
eId
},
{
uId
});
...
@@ -154,14 +153,14 @@ export async function createRuFu(uId, param) {
...
@@ -154,14 +153,14 @@ export async function createRuFu(uId, param) {
}
}
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
租赁信息
,
leaseInfo
,
{});
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
租赁信息
,
leaseInfo
,
{});
let
addUInfo
=
{
//
let addUInfo = {
eId
:
addEInfo
.
eId
,
//
eId:addEInfo.eId,
uId
:
randomId
(
TABLEID
.
企业用户表
),
//
uId:randomId(TABLEID.企业用户表),
phone
:
param
.
phone
,
//
phone:param.phone,
pwd
:
param
.
pwd
,
//
pwd:param.pwd,
userName
:
param
.
userName
//
userName:param.userName
};
//
};
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
企业用户表
,
addUInfo
,
{});
//
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业用户表, addUInfo, {});
return
{
eId
:
addEInfo
.
eId
};
return
{
eId
:
addEInfo
.
eId
};
...
@@ -200,6 +199,11 @@ export async function getRuFu(eId:string) {
...
@@ -200,6 +199,11 @@ export async function getRuFu(eId:string) {
dataInfo
.
businessLicense
=
leaseInfo
.
businessLicense
;
dataInfo
.
businessLicense
=
leaseInfo
.
businessLicense
;
dataInfo
.
agreement
=
leaseInfo
.
agreement
;
dataInfo
.
agreement
=
leaseInfo
.
agreement
;
// dataInfo.leaseContract = getFileNameAndFormat(leaseInfo.leaseContract);
// dataInfo.entryPlan = getFileNameAndFormat(leaseInfo.entryPlan);
// dataInfo.businessLicense = getFileNameAndFormat(leaseInfo.businessLicense);
// dataInfo.agreement = getFileNameAndFormat(leaseInfo.agreement);
dataInfo
.
leaseContractModelUrl
=
"/yuyi/files/房屋租赁合同模板.docx"
;
dataInfo
.
leaseContractModelUrl
=
"/yuyi/files/房屋租赁合同模板.docx"
;
dataInfo
.
entryPlanModelUrl
=
"/yuyi/files/孵化企业入驻计划.xlsx"
;
dataInfo
.
entryPlanModelUrl
=
"/yuyi/files/孵化企业入驻计划.xlsx"
;
dataInfo
.
businessLicenseUrl
=
"/yuyi/files/营业执照复印件.docx"
;
dataInfo
.
businessLicenseUrl
=
"/yuyi/files/营业执照复印件.docx"
;
...
@@ -235,5 +239,24 @@ export async function updateRuFu(eId:string, param) {
...
@@ -235,5 +239,24 @@ export async function updateRuFu(eId:string, param) {
function
getFileNameAndFormat
(
fileName
:
string
|
null
|
undefined
):
string
{
if
(
fileName
===
null
||
fileName
===
undefined
||
fileName
===
"未提交"
)
{
return
"未提交"
;
}
// 提取文件名(去掉路径)
let
basename
=
fileName
.
split
(
'/'
).
pop
()
||
fileName
;
// 移除时间戳(假设时间戳格式为 YYYYMMDD_HHMMSS)
basename
=
basename
.
replace
(
/
(\d{8}
_
\d{6})
/
,
''
);
// 分割文件名和格式
const
parts
=
basename
.
split
(
'.'
);
if
(
parts
.
length
<
2
)
{
return
basename
;
// 如果没有找到 . 则直接返回原字符串
}
const
name
=
parts
.
slice
(
0
,
-
1
).
join
(
'.'
);
const
format
=
parts
.
pop
();
return
`
${
name
.
trim
()}
.
${
format
}
`
;
}
src/biz/zaiFu.ts
View file @
6b0e04e8
...
@@ -237,7 +237,7 @@ export async function enterpriseMigrateList(enterpriseName:string, page:number)
...
@@ -237,7 +237,7 @@ export async function enterpriseMigrateList(enterpriseName:string, page:number)
let
filesList
=
[
"eId"
,
"enterpriseName"
,
"uscc"
,
"logonTime"
,
"logonAddress"
,
"qiYeGuiMo"
];
let
filesList
=
[
"eId"
,
"enterpriseName"
,
"uscc"
,
"logonTime"
,
"logonAddress"
,
"qiYeGuiMo"
];
let
manyTableInfo
:
any
=
{};
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
租赁信息
]
=
{
column
:[
"area"
,
"startTime"
,
"endTime"
,
"roomNumber"
],
where
:{}
};
manyTableInfo
[
TABLENAME
.
租赁信息
]
=
{
column
:[
"area"
,
"startTime"
,
"endTime"
,
"
building"
,
"
roomNumber"
],
where
:{}
};
// 关联企业孵化信息表,获取 moveOutTime 字段
// 关联企业孵化信息表,获取 moveOutTime 字段
manyTableInfo
[
TABLENAME
.
企业孵化信息
]
=
{
column
:
[
"moveOutTime"
,
"moveOutType"
,
"startTime"
,
"endTime"
],
where
:
{
state
:
enumConfig
.
FUHUASTATE
.
迁出
}
};
manyTableInfo
[
TABLENAME
.
企业孵化信息
]
=
{
column
:
[
"moveOutTime"
,
"moveOutType"
,
"startTime"
,
"endTime"
],
where
:
{
state
:
enumConfig
.
FUHUASTATE
.
迁出
}
};
...
@@ -287,10 +287,11 @@ export async function enterpriseMigrateList(enterpriseName:string, page:number)
...
@@ -287,10 +287,11 @@ export async function enterpriseMigrateList(enterpriseName:string, page:number)
roomNumber
:
enterprise_leases
[
0
].
roomNumber
,
//室号
roomNumber
:
enterprise_leases
[
0
].
roomNumber
,
//室号
};
};
dataList
.
push
(
dataInfo
);
dataList
.
push
(
dataInfo
);
})
})
return
{
dataList
,
dataCount
:
dataCount
.
length
};
return
{
dataList
,
dataCount
:
dataCount
.
length
};
}
}
/**
/**
...
@@ -321,13 +322,19 @@ export async function getDetails(eId:string) {
...
@@ -321,13 +322,19 @@ export async function getDetails(eId:string) {
export
async
function
enterpriseById
(
eId
:
string
)
{
export
async
function
enterpriseById
(
eId
:
string
)
{
let
filesList
=
[
"enterpriseName"
,
"uscc"
,
"logonTime"
,
"logonAddress"
,
"qiYeGuiMo"
];
let
filesList
=
[
"enterpriseName"
,
"uscc"
,
"logonTime"
,
"logonAddress"
,
"qiYeGuiMo"
];
let
manyTableInfo
:
any
=
{};
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
租赁信息
]
=
{
column
:[
"area"
,
"startTime"
,
"endTime"
,
"roomNumber"
],
where
:{
eId
}
};
manyTableInfo
[
TABLENAME
.
租赁信息
]
=
{
column
:[
"area"
,
"startTime"
,
"endTime"
,
"building"
,
"roomNumber"
],
where
:{
eId
}
};
manyTableInfo
[
TABLENAME
.
企业孵化信息
]
=
{
column
:[
"state"
,
"startTime"
,
"endTime"
],
where
:{
eId
}
};
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业基础信息表
,
{
eId
},
filesList
,
manyTableInfo
);
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业基础信息表
,
{
eId
},
filesList
,
manyTableInfo
);
let
dataList
=
[];
let
dataList
=
[];
resInfo
.
forEach
(
info
=>
{
resInfo
.
forEach
(
info
=>
{
let
{
enterpriseName
,
uscc
,
logonTime
,
logonAddress
,
qiYeGuiMo
,
enterprise_leases
}
=
info
;
let
{
enterpriseName
,
uscc
,
logonTime
,
logonAddress
,
qiYeGuiMo
,
enterprise_leases
,
enterprise_fuhuas
}
=
info
;
let
fuhuasTime
=
'-'
if
(
enterprise_fuhuas
[
0
].
startTime
){
fuhuasTime
=
`
${
moment
(
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_fuhuas
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
}
let
leasesTime
=
'-'
let
leasesTime
=
'-'
if
(
enterprise_leases
[
0
].
startTime
){
if
(
enterprise_leases
[
0
].
startTime
){
leasesTime
=
`
${
moment
(
enterprise_leases
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_leases
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
leasesTime
=
`
${
moment
(
enterprise_leases
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_leases
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
...
@@ -355,6 +362,10 @@ export async function enterpriseById(eId:string) {
...
@@ -355,6 +362,10 @@ export async function enterpriseById(eId:string) {
value
:
qiYeGuiMo
value
:
qiYeGuiMo
},
},
{
{
key
:
"孵化时间"
,
value
:
fuhuasTime
},
{
key
:
"租赁时间"
,
key
:
"租赁时间"
,
value
:
leasesTime
value
:
leasesTime
},
},
...
@@ -363,6 +374,10 @@ export async function enterpriseById(eId:string) {
...
@@ -363,6 +374,10 @@ export async function enterpriseById(eId:string) {
value
:
enterprise_leases
[
0
].
area
+
"㎡"
value
:
enterprise_leases
[
0
].
area
+
"㎡"
},
},
{
{
key
:
"园区楼号"
,
value
:
enterprise_leases
[
0
].
building
},
{
key
:
"室号"
,
key
:
"室号"
,
value
:
enterprise_leases
[
0
].
roomNumber
value
:
enterprise_leases
[
0
].
roomNumber
}
}
...
@@ -705,20 +720,117 @@ export async function enterpriseServiceById(eId:string) {
...
@@ -705,20 +720,117 @@ export async function enterpriseServiceById(eId:string) {
//下载
/**下载(之前的备份)*/
export
async
function
dwEnterpriseTable
(
enterpriseName
:
string
,
type
:
number
,
files
)
{
// export async function dwEnterpriseTable(enterpriseName:string, type:number, files) {
// let selectParam:any = {state:1};
// if (type ==1) {
// if (enterpriseName) {
// selectParam.enterpriseName = {"%like%":enterpriseName}
// }
// }
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress", "qiYeGuiMo"];
// let manyTableInfo:any = {};
// manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime","building", "roomNumber" ], where:{} };
// // 关联企业孵化信息表,获取 moveOutTime 字段
// manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType", "startTime", "endTime",], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出} } };
// let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
// let dataList = [];
// let titleList = []
// let valueList = [];
// files.forEach(item => {
// titleList.push(item.key);
// valueList.push(item.value);
// });
// dataList.push(titleList);
// resInfo.forEach(info => {
// let {enterpriseName, uscc, logonTime, logonAddress, qiYeGuiMo, enterprise_leases, enterprise_fuhuas} = info;
// let leasesTime = '-'
// if (enterprise_leases[0].startTime){
// leasesTime = `${moment(enterprise_leases[0].startTime).format("YYYY-MM-DD")}至${moment(enterprise_leases[0].endTime).format("YYYY-MM-DD")}`;
// }
// let fuhuaTime = '-';
// if (enterprise_fuhuas[0].startTime){
// fuhuaTime = `${moment(enterprise_fuhuas[0].startTime).format("YYYY-MM-DD")}至${moment(enterprise_fuhuas[0].endTime).format("YYYY-MM-DD")}`;
// }
// let subList = [];
// valueList.forEach(subInfo => {
// if (subInfo == "enterpriseName") subList.push(enterpriseName);//企业名称
// if (subInfo == "uscc") subList.push(uscc); //统一信用代码
// if (subInfo == "logonTime") subList.push(moment(logonTime).format("YYYY-MM-DD"));//注册日期
// if (subInfo == "logonAddress") subList.push(changeAdd(JSON.parse(logonAddress)));//注册地址
// if (subInfo == "qiYeGuiMo") subList.push(qiYeGuiMo);//企业规模
// if (subInfo == "startTime") subList.push(fuhuaTime);//孵化时间
// if (subInfo == "startTime") subList.push(leasesTime);//租赁时间
// if (subInfo == "area") subList.push(enterprise_leases[0].area+"㎡");//租赁面积
// if (subInfo == "building") subList.push(enterprise_leases[0].building);//楼号
// if (subInfo == "roomNumber") subList.push(enterprise_leases[0].roomNumber);//室号
// });
// dataList.push(subList);
// })
// return {dataList};
// }
/**
* 加了注册时间,租赁时间,园区楼号筛选的
*/
export
async
function
dwEnterpriseTable
(
enterpriseName
:
string
,
type
:
number
,
logonStartTime
:
string
,
logonEndTime
:
string
,
startTime
:
number
,
endTime
:
number
,
building
:
number
)
{
let
files
=
[{
key
:
"企业名称"
,
value
:
"enterpriseName"
},
{
key
:
"统一信用代码"
,
value
:
"uscc"
},
{
key
:
"注册时间"
,
value
:
"logonTime"
},
{
key
:
"注册地址"
,
value
:
"logonAddress"
},
{
key
:
"企业规模"
,
value
:
"qiYeGuiMo"
},
{
key
:
"孵化时间"
,
value
:
"fuhuaStartTime"
},
//孵化时间
{
key
:
"租赁时间"
,
value
:
"leaseStartTime"
},
{
key
:
"租赁面积"
,
value
:
"area"
,},
{
key
:
"楼号"
,
value
:
"building"
},
//楼号
{
key
:
"室号"
,
value
:
"roomNumber"
},
];
let
selectParam
:
any
=
{
state
:
1
};
let
selectParam
:
any
=
{
state
:
1
};
if
(
type
==
1
)
{
if
(
type
==
1
)
{
if
(
enterpriseName
)
{
if
(
enterpriseName
)
{
selectParam
.
enterpriseName
=
{
"%like%"
:
enterpriseName
}
selectParam
.
enterpriseName
=
{
"%like%"
:
enterpriseName
}
}
}
// 注册时间筛选
if
(
logonStartTime
&&
logonEndTime
)
{
selectParam
.
logonTime
=
{
"%between%"
:[
getMySqlMs
(
logonStartTime
),
getMySqlMs
(
logonEndTime
)]}
}
}
}
let
filesList
=
[
"eId"
,
"enterpriseName"
,
"uscc"
,
"logonTime"
,
"logonAddress"
,
"qiYeGuiMo"
];
let
filesList
=
[
"eId"
,
"enterpriseName"
,
"uscc"
,
"logonTime"
,
"logonAddress"
,
"qiYeGuiMo"
];
let
manyTableInfo
:
any
=
{};
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
租赁信息
]
=
{
column
:[
"area"
,
"startTime"
,
"endTime"
,
"building"
,
"roomNumber"
],
where
:{}
};
// 租赁信息表配置
let
leaseWhere
:
any
=
{};
if
(
startTime
&&
endTime
)
{
if
(
!
leaseWhere
[
"%literal%"
])
{
leaseWhere
[
"%literal%"
]
=
`(startTime between '
${
getMySqlMs
(
startTime
)}
' and '
${
getMySqlMs
(
endTime
)}
'
or endTime between '
${
getMySqlMs
(
startTime
)}
' and '
${
getMySqlMs
(
endTime
)}
') `
;
}
}
if
(
building
)
{
leaseWhere
.
building
=
building
;
}
// 租赁信息表配置
manyTableInfo
[
TABLENAME
.
租赁信息
]
=
{
column
:
[
"area"
,
"startTime"
,
"endTime"
,
"building"
,
"roomNumber"
],
where
:
leaseWhere
};
// 关联企业孵化信息表,获取 moveOutTime 字段
// 关联企业孵化信息表,获取 moveOutTime 字段
manyTableInfo
[
TABLENAME
.
企业孵化信息
]
=
{
column
:
[
"moveOutTime"
,
"moveOutType"
,
"startTime"
,
"endTime"
,],
where
:
{
state
:{
"%ne%"
:
enumConfig
.
FUHUASTATE
.
迁出
}
}
};
manyTableInfo
[
TABLENAME
.
企业孵化信息
]
=
{
column
:
[
"moveOutTime"
,
"moveOutType"
,
"startTime"
,
"endTime"
,],
where
:
{
state
:{
"%ne%"
:
enumConfig
.
FUHUASTATE
.
迁出
}
}
};
...
@@ -743,6 +855,7 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
...
@@ -743,6 +855,7 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
if
(
enterprise_fuhuas
[
0
].
startTime
){
if
(
enterprise_fuhuas
[
0
].
startTime
){
fuhuaTime
=
`
${
moment
(
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_fuhuas
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
fuhuaTime
=
`
${
moment
(
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_fuhuas
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
}
}
let
subList
=
[];
let
subList
=
[];
valueList
.
forEach
(
subInfo
=>
{
valueList
.
forEach
(
subInfo
=>
{
...
@@ -751,8 +864,8 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
...
@@ -751,8 +864,8 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
if
(
subInfo
==
"logonTime"
)
subList
.
push
(
moment
(
logonTime
).
format
(
"YYYY-MM-DD"
));
//注册日期
if
(
subInfo
==
"logonTime"
)
subList
.
push
(
moment
(
logonTime
).
format
(
"YYYY-MM-DD"
));
//注册日期
if
(
subInfo
==
"logonAddress"
)
subList
.
push
(
changeAdd
(
JSON
.
parse
(
logonAddress
)));
//注册地址
if
(
subInfo
==
"logonAddress"
)
subList
.
push
(
changeAdd
(
JSON
.
parse
(
logonAddress
)));
//注册地址
if
(
subInfo
==
"qiYeGuiMo"
)
subList
.
push
(
qiYeGuiMo
);
//企业规模
if
(
subInfo
==
"qiYeGuiMo"
)
subList
.
push
(
qiYeGuiMo
);
//企业规模
if
(
subInfo
==
"
s
tartTime"
)
subList
.
push
(
fuhuaTime
);
//孵化时间
if
(
subInfo
==
"
fuhuaS
tartTime"
)
subList
.
push
(
fuhuaTime
);
//孵化时间
if
(
subInfo
==
"
s
tartTime"
)
subList
.
push
(
leasesTime
);
//租赁时间
if
(
subInfo
==
"
leaseS
tartTime"
)
subList
.
push
(
leasesTime
);
//租赁时间
if
(
subInfo
==
"area"
)
subList
.
push
(
enterprise_leases
[
0
].
area
+
"㎡"
);
//租赁面积
if
(
subInfo
==
"area"
)
subList
.
push
(
enterprise_leases
[
0
].
area
+
"㎡"
);
//租赁面积
if
(
subInfo
==
"building"
)
subList
.
push
(
enterprise_leases
[
0
].
building
);
//楼号
if
(
subInfo
==
"building"
)
subList
.
push
(
enterprise_leases
[
0
].
building
);
//楼号
if
(
subInfo
==
"roomNumber"
)
subList
.
push
(
enterprise_leases
[
0
].
roomNumber
);
//室号
if
(
subInfo
==
"roomNumber"
)
subList
.
push
(
enterprise_leases
[
0
].
roomNumber
);
//室号
...
@@ -765,28 +878,37 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
...
@@ -765,28 +878,37 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
return
{
dataList
};
return
{
dataList
};
}
}
/**
* 加了注册时间,租赁时间,园区楼号筛选的
*/
// export async function dwEnterpriseTable(enterpriseName:string, type:number,files, logonStartTime:string, logonEndTime:string, startTime: number,endTime: number, building: number ) {
// let selectParam:any = {state:1};
// if (type ==1) {
// export async function dwEnterpriseTable(enterpriseName: string, type: number, logonStartTime: string, logonEndTime: string, startTime: number, endTime: number, building: number) {
// let files = [{key:"企业名称",value:"enterpriseName"},
// {key:"统一信用代码",value:"uscc"},
// {key:"注册时间",value:"logonTime"},
// {key:"注册地址",value:"logonAddress"},
// {key:"企业规模",value:"qiYeGuiMo"},
// {key:"孵化时间",value:"fuhuaStartTime"},//孵化时间
// {key:"租赁时间",value: "leaseStartTime"},
// {key:"租赁面积",value:"area",},
// {key:"楼号",value:"building"},//楼号
// {key:"室号",value:"roomNumber"},
// ];
// let selectParam: any = { state: 1 };
// if (type == 1) {
// if (enterpriseName) {
// if (enterpriseName) {
// selectParam.enterpriseName = {
"%like%":enterpriseName
}
// selectParam.enterpriseName = {
"%like%": enterpriseName
}
// }
// }
// // 注册时间筛选
// // 注册时间筛选
// if (logonStartTime && logonEndTime) {
// if (logonStartTime && logonEndTime) {
// selectParam.logonTime = {
"%between%":[getMySqlMs(logonStartTime), getMySqlMs(logonEndTime)]
}
// selectParam.logonTime = {
"%between%": [getMySqlMs(logonStartTime), getMySqlMs(logonEndTime)]
}
// }
// }
// }
// }
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress", "qiYeGuiMo"];
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress", "qiYeGuiMo"];
// let manyTableInfo:any = {};
// let manyTableInfo:
any = {};
// // manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime","building", "roomNumber" ], where:{} };
// // 租赁信息表配置
// // 租赁信息表配置
// let leaseWhere:any = {};
// let leaseWhere:
any = {};
// if (startTime && endTime) {
// if (startTime && endTime) {
// if (!leaseWhere["%literal%"]) {
// if (!leaseWhere["%literal%"]) {
// leaseWhere["%literal%"] = `(startTime between '${getMySqlMs(startTime)}' and '${getMySqlMs(endTime)}'
// leaseWhere["%literal%"] = `(startTime between '${getMySqlMs(startTime)}' and '${getMySqlMs(endTime)}'
...
@@ -799,7 +921,7 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
...
@@ -799,7 +921,7 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
// }
// }
// // 关联企业孵化信息表,获取 moveOutTime 字段
// // 关联企业孵化信息表,获取 moveOutTime 字段
// manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime",
"moveOutType", "startTime", "endTime",], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出
} } };
// manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime",
"moveOutType", "startTime", "endTime"], where: { state: { "%ne%": enumConfig.FUHUASTATE.迁出
} } };
// let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
// let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
...
@@ -811,38 +933,53 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
...
@@ -811,38 +933,53 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
// valueList.push(item.value);
// valueList.push(item.value);
// });
// });
// dataList.push(titleList);
// dataList.push(titleList);
// resInfo.forEach(info => {
// resInfo.forEach(info => {
// let {enterpriseName, uscc, logonTime, logonAddress, qiYeGuiMo, enterprise_leases, enterprise_fuhuas} = info;
// let { enterpriseName, uscc, logonTime, logonAddress, qiYeGuiMo, enterprise_leases, enterprise_fuhuas } = info;
// let leasesTime = '-'
// if (enterprise_leases[0].startTime){
// // 安全获取租赁信息
// leasesTime = `${moment(enterprise_leases[0].startTime).format("YYYY-MM-DD")}至${moment(enterprise_leases[0].endTime).format("YYYY-MM-DD")}`;
// let lease = { startTime: null, endTime: null, area: null, building: null, roomNumber: null };
// if (enterprise_leases && enterprise_leases.length > 0) {
// lease = enterprise_leases[0];
// }
// // 安全获取孵化信息
// let fuhua = { startTime: null, endTime: null };
// if (enterprise_fuhuas && enterprise_fuhuas.length > 0) {
// fuhua = enterprise_fuhuas[0];
// }
// }
// let fuhuaTime = '-';
// // 安全格式化日期
// if (enterprise_fuhuas[0].startTime){
// let leasesTime = '-';
// fuhuaTime = `${moment(enterprise_fuhuas[0].startTime).format("YYYY-MM-DD")}至${moment(enterprise_fuhuas[0].endTime).format("YYYY-MM-DD")}`;
// if (lease.startTime && lease.endTime) {
// leasesTime = `${moment(lease.startTime).format("YYYY-MM-DD")}至${moment(lease.endTime).format("YYYY-MM-DD")}`;
// }
// }
// let fuhuasTime = '-';
// if (fuhua.startTime && fuhua.endTime) {
// fuhuasTime = `${moment(fuhua.startTime).format("YYYY-MM-DD")}至${moment(fuhua.endTime).format("YYYY-MM-DD")}`;
// }
// let subList = [];
// let subList = [];
// valueList.forEach(subInfo => {
// valueList.forEach(subInfo => {
// if (subInfo == "enterpriseName") subList.push(enterpriseName);
//
企业名称
// if (subInfo == "enterpriseName") subList.push(enterpriseName);
//
企业名称
// if (subInfo == "uscc") subList.push(uscc); //统一信用代码
// if (subInfo == "uscc") subList.push(uscc); //
统一信用代码
// if (subInfo == "logonTime") subList.push(moment(logonTime).format("YYYY-MM-DD"));
//
注册日期
// if (subInfo == "logonTime") subList.push(moment(logonTime).format("YYYY-MM-DD"));
//
注册日期
// if (subInfo == "logonAddress") subList.push(changeAdd(JSON.parse(logonAddress)));
//
注册地址
// if (subInfo == "logonAddress") subList.push(changeAdd(JSON.parse(logonAddress)));
//
注册地址
// if (subInfo == "qiYeGuiMo") subList.push(qiYeGuiMo);
//
企业规模
// if (subInfo == "qiYeGuiMo") subList.push(qiYeGuiMo);
//
企业规模
// if (subInfo == "
startTime") subList.push(fuhuaTime);//
孵化时间
// if (subInfo == "
fuhuaStartTime") subList.push(fuhuasTime); //
孵化时间
// if (subInfo == "
startTime") subList.push(leasesTime);//
租赁时间
// if (subInfo == "
leaseStartTime") subList.push(leasesTime); //
租赁时间
// if (subInfo == "area") subList.push(
enterprise_leases[0].area+"㎡");//
租赁面积
// if (subInfo == "area") subList.push(
lease.area ? `${lease.area}㎡` : '-'); //
租赁面积
// if (subInfo == "building") subList.push(
enterprise_leases[0].building);//
楼号
// if (subInfo == "building") subList.push(
lease.building || '-'); //
楼号
// if (subInfo == "roomNumber") subList.push(
enterprise_leases[0].roomNumber);//
室号
// if (subInfo == "roomNumber") subList.push(
lease.roomNumber || '-'); //
室号
// });
// });
// dataList.push(subList);
// dataList.push(subList);
// })
// });
// return { dataList };
// return {dataList};
// }
// }
export
async
function
getAllDwOutPut
(
eId
:
string
)
{
export
async
function
getAllDwOutPut
(
eId
:
string
)
{
...
@@ -870,8 +1007,8 @@ export async function dwBasicInformation(eId:string) {
...
@@ -870,8 +1007,8 @@ export async function dwBasicInformation(eId:string) {
{
key
:
"注册时间"
,
value
:
"logonTime"
},
{
key
:
"注册时间"
,
value
:
"logonTime"
},
{
key
:
"注册地址"
,
value
:
"logonAddress"
},
{
key
:
"注册地址"
,
value
:
"logonAddress"
},
{
key
:
"企业规模"
,
value
:
"qiYeGuiMo"
},
{
key
:
"企业规模"
,
value
:
"qiYeGuiMo"
},
{
key
:
"孵化时间"
,
value
:
"
s
tartTime"
},
//孵化时间
{
key
:
"孵化时间"
,
value
:
"
fuhuaS
tartTime"
},
//孵化时间
{
key
:
"租赁时间"
,
value
:
"
s
tartTime"
},
{
key
:
"租赁时间"
,
value
:
"
leaseS
tartTime"
},
{
key
:
"租赁面积"
,
value
:
"area"
,},
{
key
:
"租赁面积"
,
value
:
"area"
,},
{
key
:
"楼号"
,
value
:
"building"
},
//楼号
{
key
:
"楼号"
,
value
:
"building"
},
//楼号
{
key
:
"室号"
,
value
:
"roomNumber"
},
{
key
:
"室号"
,
value
:
"roomNumber"
},
...
@@ -899,9 +1036,9 @@ export async function dwBasicInformation(eId:string) {
...
@@ -899,9 +1036,9 @@ export async function dwBasicInformation(eId:string) {
if
(
enterprise_leases
[
0
].
startTime
){
if
(
enterprise_leases
[
0
].
startTime
){
leasesTime
=
`
${
moment
(
enterprise_leases
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_leases
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
leasesTime
=
`
${
moment
(
enterprise_leases
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_leases
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
}
}
let
fuhuaTime
=
'-'
;
let
fuhua
s
Time
=
'-'
;
if
(
enterprise_fuhuas
[
0
].
startTime
){
if
(
enterprise_fuhuas
[
0
].
startTime
){
fuhuaTime
=
`
${
moment
(
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_fuhuas
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
fuhua
s
Time
=
`
${
moment
(
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
enterprise_fuhuas
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
;
}
}
let
subList
=
[];
let
subList
=
[];
valueList
.
forEach
(
subInfo
=>
{
valueList
.
forEach
(
subInfo
=>
{
...
@@ -910,8 +1047,8 @@ export async function dwBasicInformation(eId:string) {
...
@@ -910,8 +1047,8 @@ export async function dwBasicInformation(eId:string) {
if
(
subInfo
==
"logonTime"
)
subList
.
push
(
moment
(
logonTime
).
format
(
"YYYY-MM-DD"
));
//注册日期
if
(
subInfo
==
"logonTime"
)
subList
.
push
(
moment
(
logonTime
).
format
(
"YYYY-MM-DD"
));
//注册日期
if
(
subInfo
==
"logonAddress"
)
subList
.
push
(
changeAdd
(
JSON
.
parse
(
logonAddress
)));
//注册地址
if
(
subInfo
==
"logonAddress"
)
subList
.
push
(
changeAdd
(
JSON
.
parse
(
logonAddress
)));
//注册地址
if
(
subInfo
==
"qiYeGuiMo"
)
subList
.
push
(
qiYeGuiMo
);
//企业规模
if
(
subInfo
==
"qiYeGuiMo"
)
subList
.
push
(
qiYeGuiMo
);
//企业规模
if
(
subInfo
==
"
startTime"
)
subList
.
push
(
fuhua
Time
);
//孵化时间
if
(
subInfo
==
"
fuhuaStartTime"
)
subList
.
push
(
fuhuas
Time
);
//孵化时间
if
(
subInfo
==
"
s
tartTime"
)
subList
.
push
(
leasesTime
);
//租赁时间
if
(
subInfo
==
"
leaseS
tartTime"
)
subList
.
push
(
leasesTime
);
//租赁时间
if
(
subInfo
==
"area"
)
subList
.
push
(
enterprise_leases
[
0
].
area
+
"㎡"
);
//租赁面积
if
(
subInfo
==
"area"
)
subList
.
push
(
enterprise_leases
[
0
].
area
+
"㎡"
);
//租赁面积
if
(
subInfo
==
"building"
)
subList
.
push
(
enterprise_leases
[
0
].
building
);
//楼号
if
(
subInfo
==
"building"
)
subList
.
push
(
enterprise_leases
[
0
].
building
);
//楼号
if
(
subInfo
==
"roomNumber"
)
subList
.
push
(
enterprise_leases
[
0
].
roomNumber
);
//室号
if
(
subInfo
==
"roomNumber"
)
subList
.
push
(
enterprise_leases
[
0
].
roomNumber
);
//室号
...
...
src/config/eccParam/enterprise.ts
View file @
6b0e04e8
...
@@ -136,9 +136,9 @@ export const UserRegisterAddConfig = {
...
@@ -136,9 +136,9 @@ export const UserRegisterAddConfig = {
leaseStartTime
:
{
type
:
'string'
,
required
:
true
,
message
:
'租赁开始时间不能为空'
},
leaseStartTime
:
{
type
:
'string'
,
required
:
true
,
message
:
'租赁开始时间不能为空'
},
leaseEndTime
:
{
type
:
'string'
,
required
:
true
,
message
:
'租赁结束时间不能为空'
},
leaseEndTime
:
{
type
:
'string'
,
required
:
true
,
message
:
'租赁结束时间不能为空'
},
mail
:
{
type
:
'string'
,
required
:
true
,
message
:
'邮箱地址不能为空'
},
mail
:
{
type
:
'string'
,
required
:
true
,
message
:
'邮箱地址不能为空'
},
userName
:
{
type
:
'string'
,
required
:
true
,
message
:
'联系人不能为空'
},
//
userName: { type: 'string', required: true, message: '联系人不能为空' },
phone
:
{
type
:
'string'
,
required
:
true
,
message
:
'登录手机号码不能为空'
},
//
phone: { type: 'string', required: true, message: '登录手机号码不能为空' },
pwd
:
{
type
:
'string'
,
required
:
true
,
message
:
'登录密码不能为空'
},
//
pwd: { type: 'string', required: true, message: '登录密码不能为空' },
building
:
{
type
:
'string'
,
required
:
false
},
// 租赁楼号非必填
building
:
{
type
:
'string'
,
required
:
false
},
// 租赁楼号非必填
roomNumber
:
{
type
:
'string'
,
required
:
false
},
// 租赁室号非必填
roomNumber
:
{
type
:
'string'
,
required
:
false
},
// 租赁室号非必填
area
:
{
type
:
'number'
,
required
:
false
},
// 租赁面积非必填
area
:
{
type
:
'number'
,
required
:
false
},
// 租赁面积非必填
...
...
src/config/enum/enum.ts
View file @
6b0e04e8
...
@@ -37,6 +37,7 @@ export enum DEGREE {
...
@@ -37,6 +37,7 @@ export enum DEGREE {
硕士
,
硕士
,
博士
,
博士
,
博士以上
,
博士以上
,
其他
}
}
/**
/**
...
...
src/main.ts
View file @
6b0e04e8
import
{
qccData
}
from
"./biz/dataInit"
;
import
{
qccData
}
from
"./biz/dataInit"
;
import
{
TABLEID
}
from
"./config/enum/dbEnum"
;
import
{
initConfig
,
systemConfig
}
from
"./config/serverConfig"
;
import
{
initConfig
,
systemConfig
}
from
"./config/serverConfig"
;
import
{
httpServer
}
from
"./net/http_server"
;
import
{
httpServer
}
from
"./net/http_server"
;
import
{
randomId
}
from
"./tools/system"
;
async
function
lanuch
()
{
async
function
lanuch
()
{
await
initConfig
();
await
initConfig
();
...
...
src/routers/admin.ts
View file @
6b0e04e8
...
@@ -429,10 +429,10 @@ async function enterpriseDetails(req, res) {
...
@@ -429,10 +429,10 @@ async function enterpriseDetails(req, res) {
* @param res
* @param res
*/
*/
async
function
dwEnterpriseList
(
req
,
res
)
{
async
function
dwEnterpriseList
(
req
,
res
)
{
// let {enterpriseName, type, files,logonStartTime, logonEndTime, startTime,
endTime, building } = req.body
let
{
enterpriseName
,
type
,
logonStartTime
,
logonEndTime
,
startTime
,
endTime
,
building
}
=
req
.
body
// let result = await zaiFuBiz.dwEnterpriseTable(enterpriseName, type, files,logonStartTime, logonEndTime, startTime,
endTime, building );
let
result
=
await
zaiFuBiz
.
dwEnterpriseTable
(
enterpriseName
,
type
,
logonStartTime
,
logonEndTime
,
startTime
,
endTime
,
building
);
let
{
enterpriseName
,
type
,
files
}
=
req
.
body
//
let {enterpriseName, type, files} = req.body
let
result
=
await
zaiFuBiz
.
dwEnterpriseTable
(
enterpriseName
,
type
,
files
);
//
let result = await zaiFuBiz.dwEnterpriseTable(enterpriseName, type, files);
res
.
success
(
result
);
res
.
success
(
result
);
}
}
...
...
src/routers/dbinit.ts
View file @
6b0e04e8
...
@@ -20,6 +20,28 @@ export function setRouter(httpServer) {
...
@@ -20,6 +20,28 @@ export function setRouter(httpServer) {
export
async
function
data1210
(
req
,
res
)
{
export
async
function
data1210
(
req
,
res
)
{
let
入驻信息
add
=
[
{
info_enterId
:
randomId
(
TABLEID
.
入驻信息表
),
building
:
'1'
,
occupancyRate
:
""
,
enteredEnterprises
:
""
},
{
info_enterId
:
randomId
(
TABLEID
.
入驻信息表
),
building
:
'3'
,
occupancyRate
:
""
,
enteredEnterprises
:
""
},
{
info_enterId
:
randomId
(
TABLEID
.
入驻信息表
),
building
:
'4'
,
occupancyRate
:
""
,
enteredEnterprises
:
""
},
]
await
operationalData
(
OPERATIONALDATATYPE
.
增加
,
TABLENAME
.
入驻信息表
,
入驻信息
add
,
{});
//读取文件
//读取文件
let
{
sheetMap
}
=
getExcel
(
path
.
join
(
__dirname
.
substring
(
0
,
__dirname
.
indexOf
(
"out"
)),
"res"
,
'在孵企业导入1210.xlsx'
));
let
{
sheetMap
}
=
getExcel
(
path
.
join
(
__dirname
.
substring
(
0
,
__dirname
.
indexOf
(
"out"
)),
"res"
,
'在孵企业导入1210.xlsx'
));
let
dataList
=
sheetMap
[
'Sheet1'
];
let
dataList
=
sheetMap
[
'Sheet1'
];
...
...
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