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
cebf2675
Commit
cebf2675
authored
Feb 13, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
db6ddac6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
56 deletions
+61
-56
孵化器原始数据.xlsx
res/孵化器原始数据.xlsx
+0
-0
enterprise.ts
src/biz/enterprise/enterprise.ts
+5
-1
financing.ts
src/biz/enterprise/financing.ts
+6
-2
base.ts
src/biz/fuHuqQi/base.ts
+5
-2
month.ts
src/biz/fuHuqQi/month.ts
+5
-1
admin.ts
src/routers/admin.ts
+37
-48
dataInit.ts
src/util/dataInit.ts
+3
-2
No files found.
res/孵化器原始数据.xlsx
View file @
cebf2675
No preview for this file type
src/biz/enterprise/enterprise.ts
View file @
cebf2675
...
@@ -13,6 +13,7 @@ import moment = require("moment");
...
@@ -13,6 +13,7 @@ import moment = require("moment");
import
{
createEnterprise
,
deleteEnterprise
,
findEnterpriseCount
,
findEnterpriseByUscc
,
findEnterpriseListToPage
,
findEnterpriseListByFuHuaQiUsccName
,
查询所有已绑定过的孵化器
id
,
findEnterpriseList
}
from
"../../data/enterprise/enterprise"
;
import
{
createEnterprise
,
deleteEnterprise
,
findEnterpriseCount
,
findEnterpriseByUscc
,
findEnterpriseListToPage
,
findEnterpriseListByFuHuaQiUsccName
,
查询所有已绑定过的孵化器
id
,
findEnterpriseList
}
from
"../../data/enterprise/enterprise"
;
import
{
EnterpriseListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
EnterpriseListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
findAllFuHuaQi
,
findFuHuaQiByUSCC
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
findAllFuHuaQi
,
findFuHuaQiByUSCC
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
OUTPUTTYPE
}
from
"../../config/enum"
;
/**
/**
...
@@ -194,8 +195,9 @@ export async function enterpriseList(time:string, fuHuaQiUscc:string, industry,
...
@@ -194,8 +195,9 @@ export async function enterpriseList(time:string, fuHuaQiUscc:string, industry,
* @param isNaturalPersonHolding 自然人控股
* @param isNaturalPersonHolding 自然人控股
* @returns dataList
* @returns dataList
*/
*/
export
async
function
outPutEnterpriseData
(
time
:
string
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
)
{
export
async
function
outPutEnterpriseData
(
time
:
string
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
,
type
:
Number
)
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
type
==
OUTPUTTYPE
.
当前数据
)
{
if
(
time
.
length
>
0
)
{
if
(
time
.
length
>
0
)
{
let
startT
=
moment
(
time
).
startOf
(
'month'
).
valueOf
();
let
startT
=
moment
(
time
).
startOf
(
'month'
).
valueOf
();
let
endT
=
moment
(
time
).
endOf
(
'month'
).
valueOf
();
let
endT
=
moment
(
time
).
endOf
(
'month'
).
valueOf
();
...
@@ -212,6 +214,8 @@ export async function outPutEnterpriseData(time:string, fuHuaQiUscc:string, indu
...
@@ -212,6 +214,8 @@ export async function outPutEnterpriseData(time:string, fuHuaQiUscc:string, indu
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
}
}
}
let
dataBaseList
=
await
findEnterpriseList
(
selectParam
);
let
dataBaseList
=
await
findEnterpriseList
(
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
dataBaseList
.
forEach
(
info
=>
{
...
...
src/biz/enterprise/financing.ts
View file @
cebf2675
...
@@ -14,6 +14,7 @@ import { checkChange, checkParamater, extractData, getTaskId } from "../../util/
...
@@ -14,6 +14,7 @@ import { checkChange, checkParamater, extractData, getTaskId } from "../../util/
import
{
findEnterpriseInfoByName
,
findEnterpriseListByFuHuaQiUsccName
}
from
"../../data/enterprise/enterprise"
;
import
{
findEnterpriseInfoByName
,
findEnterpriseListByFuHuaQiUsccName
}
from
"../../data/enterprise/enterprise"
;
import
{
findFuHuaQiByName
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
findFuHuaQiByName
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
OUTPUTTYPE
}
from
"../../config/enum"
;
/**
/**
...
@@ -187,15 +188,17 @@ export async function financingList(monthData:string, fuHuaQiName:string, indust
...
@@ -187,15 +188,17 @@ export async function financingList(monthData:string, fuHuaQiName:string, indust
* @param page 页数
* @param page 页数
* @returns
* @returns
*/
*/
export
async
function
outPutFinancingList
(
monthData
:
string
,
fuHuaQiName
:
string
,
industry
,
fuHuaQiInvestment
:
number
)
{
export
async
function
outPutFinancingList
(
monthData
:
string
,
fuHuaQiName
:
string
,
industry
,
fuHuaQiInvestment
:
number
,
type
:
number
)
{
let
selectParam
:
any
=
{};
if
(
type
==
OUTPUTTYPE
.
当前数据
)
{
let
fuHuaQiUscc
=
""
;
let
fuHuaQiUscc
=
""
;
if
(
fuHuaQiName
.
length
>
0
)
{
if
(
fuHuaQiName
.
length
>
0
)
{
let
fuHuaQiInfo
=
await
findFuHuaQiByName
(
fuHuaQiName
);
let
fuHuaQiInfo
=
await
findFuHuaQiByName
(
fuHuaQiName
);
if
(
fuHuaQiInfo
)
fuHuaQiUscc
=
fuHuaQiInfo
.
uscc
;
if
(
fuHuaQiInfo
)
fuHuaQiUscc
=
fuHuaQiInfo
.
uscc
;
}
}
let
selectParam
:
any
=
{};
if
(
monthData
.
length
>
0
)
{
if
(
monthData
.
length
>
0
)
{
let
startT
=
moment
(
monthData
).
startOf
(
'month'
).
valueOf
();
let
startT
=
moment
(
monthData
).
startOf
(
'month'
).
valueOf
();
let
endT
=
moment
(
monthData
).
endOf
(
'month'
).
valueOf
();
let
endT
=
moment
(
monthData
).
endOf
(
'month'
).
valueOf
();
...
@@ -207,6 +210,7 @@ export async function outPutFinancingList(monthData:string, fuHuaQiName:string,
...
@@ -207,6 +210,7 @@ export async function outPutFinancingList(monthData:string, fuHuaQiName:string,
selectParam
.
fuHuaQiInvestment
=
fuHuaQiInvestment
==
2
?
true
:
false
;
selectParam
.
fuHuaQiInvestment
=
fuHuaQiInvestment
==
2
?
true
:
false
;
}
}
}
let
dataBaseList
=
await
findFinancingList
(
selectParam
);
let
dataBaseList
=
await
findFinancingList
(
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
...
...
src/biz/fuHuqQi/base.ts
View file @
cebf2675
...
@@ -9,7 +9,7 @@ import { findEnterpriseCount, findEnterpriseCountByFuHuaQiUscc, groupFindEnterpr
...
@@ -9,7 +9,7 @@ import { findEnterpriseCount, findEnterpriseCountByFuHuaQiUscc, groupFindEnterpr
import
{
findFuHuaQiByUSCC
,
findFuHuaQiCount
,
findFuHuaQiList
,
findFuHuaQiListByPage
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
findFuHuaQiByUSCC
,
findFuHuaQiCount
,
findFuHuaQiList
,
findFuHuaQiListByPage
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
*
as
tools
from
"../../util/tools"
;
import
*
as
tools
from
"../../util/tools"
;
import
{
FuHuaQiHomeDataConfig
,
FuHuaQiBaseListConfig
,
FuHuaQiBaseDataConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
FuHuaQiHomeDataConfig
,
FuHuaQiBaseListConfig
,
FuHuaQiBaseDataConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
FUHUAINDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
FUHUAQILV
,
INSTITUTIONALNATURE
}
from
"../../config/enum"
;
import
{
FUHUAINDUSTRY
,
FUHUAQILNVESTMENTSTYLE
,
FUHUAQILV
,
INSTITUTIONALNATURE
,
OUTPUTTYPE
}
from
"../../config/enum"
;
import
{
extractData
}
from
"../../util/tools"
;
import
{
extractData
}
from
"../../util/tools"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
...
@@ -147,11 +147,14 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
...
@@ -147,11 +147,14 @@ export async function fuHuaQiBaseList(lv:number, institutionalNature:number, ind
* @param industry
* @param industry
* @returns
* @returns
*/
*/
export
async
function
outPutFuHuaQiBaseData
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
)
{
export
async
function
outPutFuHuaQiBaseData
(
lv
:
number
,
institutionalNature
:
number
,
industry
:
number
,
type
:
Number
)
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
type
==
OUTPUTTYPE
.
当前数据
)
{
if
(
lv
)
selectParam
.
lv
=
lv
;
if
(
lv
)
selectParam
.
lv
=
lv
;
if
(
institutionalNature
)
selectParam
.
institutionalNature
=
institutionalNature
;
if
(
institutionalNature
)
selectParam
.
institutionalNature
=
institutionalNature
;
if
(
industry
)
selectParam
.
industry
=
industry
;
if
(
industry
)
selectParam
.
industry
=
industry
;
}
let
enterpriseMap
=
await
groupFindEnterprise
();
//企业总数
let
enterpriseMap
=
await
groupFindEnterprise
();
//企业总数
...
...
src/biz/fuHuqQi/month.ts
View file @
cebf2675
...
@@ -10,6 +10,7 @@ import * as monthData from "../../data/fuHuaQi/monthTable";
...
@@ -10,6 +10,7 @@ import * as monthData from "../../data/fuHuaQi/monthTable";
import
{
changeEnumValue
,
extractData
,
getTaskId
}
from
"../../util/tools"
;
import
{
changeEnumValue
,
extractData
,
getTaskId
}
from
"../../util/tools"
;
import
{
findAllFuHuaQiOperationNameMap
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
findAllFuHuaQiOperationNameMap
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
MonthConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
MonthConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
OUTPUTTYPE
}
from
"../../config/enum"
;
/**
/**
...
@@ -136,14 +137,17 @@ export async function monthTableList(state:number, year:number, month:number, pa
...
@@ -136,14 +137,17 @@ export async function monthTableList(state:number, year:number, month:number, pa
* @param month 数据月份
* @param month 数据月份
* @param page 页面
* @param page 页面
*/
*/
export
async
function
outPutMonthTableList
(
state
:
number
,
year
:
number
,
month
:
number
)
{
export
async
function
outPutMonthTableList
(
state
:
number
,
year
:
number
,
month
:
number
,
type
:
number
)
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
// if (state) selectParam.state = state;
// if (state) selectParam.state = state;
if
(
type
==
OUTPUTTYPE
.
当前数据
)
{
if
(
state
==
2
||
state
==
3
)
{
if
(
state
==
2
||
state
==
3
)
{
selectParam
.
draftLock
=
state
==
2
?
true
:
false
;
selectParam
.
draftLock
=
state
==
2
?
true
:
false
;
}
}
if
(
year
)
selectParam
.
year
=
year
;
if
(
year
)
selectParam
.
year
=
year
;
if
(
month
)
selectParam
.
month
=
month
;
if
(
month
)
selectParam
.
month
=
month
;
}
let
dataBaseList
=
await
monthData
.
findMonthTableList
(
selectParam
);
let
dataBaseList
=
await
monthData
.
findMonthTableList
(
selectParam
);
...
...
src/routers/admin.ts
View file @
cebf2675
...
@@ -4,31 +4,32 @@ import * as baseBiz from '../biz/fuHuqQi/base';
...
@@ -4,31 +4,32 @@ import * as baseBiz from '../biz/fuHuqQi/base';
import
*
as
enterpriseBiz
from
'../biz/enterprise/enterprise'
;
import
*
as
enterpriseBiz
from
'../biz/enterprise/enterprise'
;
import
*
as
financingBiz
from
'../biz/enterprise/financing'
;
import
*
as
financingBiz
from
'../biz/enterprise/financing'
;
import
*
as
guanWeiHuiBiz
from
'../biz/guanWeiHui/user'
;
import
*
as
guanWeiHuiBiz
from
'../biz/guanWeiHui/user'
;
import
{
checkParamaterType
,
checkReqParam
}
from
'../util/tools'
;
import
{
checkParamaterType
,
checkReqParam
,
getTimeKey
}
from
'../util/tools'
;
import
{
BizError
}
from
'../util/bizError'
;
import
{
BizError
}
from
'../util/bizError'
;
import
{
ERRORENUM
}
from
'../config/errorEnum'
;
import
{
ERRORENUM
}
from
'../config/errorEnum'
;
import
{
monthTableList
,
outPutMonthTableList
}
from
'../biz/fuHuqQi/month'
;
import
{
monthTableList
,
outPutMonthTableList
}
from
'../biz/fuHuqQi/month'
;
import
{
OUTPUTDATATYPE
,
OUTPUTTYPE
}
from
'../config/enum'
;
import
{
OUTPUTDATATYPE
,
OUTPUTTYPE
}
from
'../config/enum'
;
import
{
checkGuanWeiHuiToken
}
from
'../middleware/user'
;
export
function
setRouter
(
httpServer
)
{
export
function
setRouter
(
httpServer
)
{
// /**登录 */
// /**登录 */
httpServer
.
post
(
'/admin/login'
,
asyncHandler
(
login
));
httpServer
.
post
(
'/admin/login'
,
asyncHandler
(
login
));
// /** 孵化器*/
// /** 孵化器*/
httpServer
.
post
(
'/admin/fuhuaqi/baselist'
,
asyncHandler
(
fuHuaQiBaseList
));
httpServer
.
post
(
'/admin/fuhuaqi/baselist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
fuHuaQiBaseList
));
httpServer
.
post
(
'/admin/fuhuaqi/monthoccupancyrate'
,
asyncHandler
(
getMonthList
));
httpServer
.
post
(
'/admin/fuhuaqi/monthoccupancyrate'
,
checkGuanWeiHuiToken
,
asyncHandler
(
getMonthList
));
httpServer
.
post
(
'/admin/fuhuaqi/userlist'
,
asyncHandler
(
getFuHuaQiUserList
));
httpServer
.
post
(
'/admin/fuhuaqi/userlist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
getFuHuaQiUserList
));
httpServer
.
post
(
'/admin/fuhuaqi/updatestate'
,
asyncHandler
(
updateState
));
httpServer
.
post
(
'/admin/fuhuaqi/updatestate'
,
checkGuanWeiHuiToken
,
asyncHandler
(
updateState
));
httpServer
.
post
(
'/admin/fuhuaqi/adduser'
,
asyncHandler
(
addUser
));
httpServer
.
post
(
'/admin/fuhuaqi/adduser'
,
checkGuanWeiHuiToken
,
asyncHandler
(
addUser
));
/**企业 */
/**企业 */
httpServer
.
post
(
'/admin/enterprise/list'
,
asyncHandler
(
getEnterpriseList
));
httpServer
.
post
(
'/admin/enterprise/list'
,
checkGuanWeiHuiToken
,
asyncHandler
(
getEnterpriseList
));
httpServer
.
post
(
'/admin/enterprise/financinglist'
,
asyncHandler
(
getFinancingList
));
httpServer
.
post
(
'/admin/enterprise/financinglist'
,
checkGuanWeiHuiToken
,
asyncHandler
(
getFinancingList
));
httpServer
.
post
(
'/admin/enterprise/affiliationfuhuaqi'
,
asyncHandler
(
affiliationFuHuaQi
));
httpServer
.
post
(
'/admin/enterprise/affiliationfuhuaqi'
,
checkGuanWeiHuiToken
,
asyncHandler
(
affiliationFuHuaQi
));
/**导出数据 */
/**导出数据 */
httpServer
.
post
(
'/admin/data/output/fuhuaqi'
,
asyncHandler
(
outPutFuHuaQiData
));
httpServer
.
post
(
'/admin/data/output/fuhuaqi'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutFuHuaQiData
));
httpServer
.
post
(
'/admin/data/output/enterprise'
,
asyncHandler
(
outPutEnterpriseData
));
httpServer
.
post
(
'/admin/data/output/enterprise'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutEnterpriseData
));
httpServer
.
post
(
'/admin/data/output/financing'
,
asyncHandler
(
outPutFinancingData
));
httpServer
.
post
(
'/admin/data/output/financing'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutFinancingData
));
httpServer
.
post
(
'/admin/data/output/month'
,
asyncHandler
(
outPutMonthData
));
httpServer
.
post
(
'/admin/data/output/month'
,
checkGuanWeiHuiToken
,
asyncHandler
(
outPutMonthData
));
}
}
...
@@ -156,15 +157,10 @@ async function affiliationFuHuaQi(req, res) {
...
@@ -156,15 +157,10 @@ async function affiliationFuHuaQi(req, res) {
async
function
outPutFuHuaQiData
(
req
,
res
)
{
async
function
outPutFuHuaQiData
(
req
,
res
)
{
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
industry
:
'Number'
,
dataType
:
'Number'
,
type
:
'Number'
,
page
:
'Number'
};
let
reqConf
=
{
lv
:
'Number'
,
institutionalNature
:
'Number'
,
industry
:
'Number'
,
dataType
:
'Number'
,
type
:
'Number'
};
let
{
lv
,
institutionalNature
,
industry
,
type
,
page
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
{
lv
,
institutionalNature
,
industry
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
dataList
=
[];
let
dataList
=
await
baseBiz
.
outPutFuHuaQiBaseData
(
lv
,
institutionalNature
,
industry
,
type
);
if
(
type
==
OUTPUTTYPE
.
全部数据
)
dataList
=
await
baseBiz
.
outPutFuHuaQiBaseData
(
lv
,
institutionalNature
,
industry
);
else
{
let
baseData
=
await
baseBiz
.
fuHuaQiBaseList
(
lv
,
institutionalNature
,
industry
,
page
);
dataList
=
baseData
.
dataList
;
}
let
keyList
=
[
let
keyList
=
[
"name"
,
"operationName"
,
"uscc"
,
"virtualEnterpriseNum"
,
"logonTime"
,
"name"
,
"operationName"
,
"uscc"
,
"virtualEnterpriseNum"
,
"logonTime"
,
...
@@ -186,22 +182,18 @@ async function outPutFuHuaQiData(req, res) {
...
@@ -186,22 +182,18 @@ async function outPutFuHuaQiData(req, res) {
});
});
result
.
push
(
subList
);
result
.
push
(
subList
);
});
});
let
name
=
`孵化器列表
${
getTimeKey
()}
.xlsx`
;
res
.
success
({
data
:
result
});
res
.
success
({
name
,
data
:
result
});
}
}
async
function
outPutEnterpriseData
(
req
,
res
)
{
async
function
outPutEnterpriseData
(
req
,
res
)
{
let
reqConf
=
{
time
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
page
:
'Number'
,
type
:
'Number'
};
let
reqConf
=
{
time
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'Number'
,
type
:
'Number'
};
let
{
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
{
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
dataList
=
[];
let
dataList
=
await
enterpriseBiz
.
outPutEnterpriseData
(
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
type
);
if
(
type
==
OUTPUTTYPE
.
全部数据
)
dataList
=
await
enterpriseBiz
.
outPutEnterpriseData
(
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
);
else
{
let
baseData
=
await
enterpriseBiz
.
enterpriseList
(
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
);
dataList
=
baseData
.
dataList
;
}
let
keyList
=
[
let
keyList
=
[
"name"
,
"createTime"
,
"fuhuaqiUscc"
,
"uscc"
,
"industry"
,
"logonTime"
,
"name"
,
"createTime"
,
"fuhuaqiUscc"
,
"uscc"
,
"industry"
,
"logonTime"
,
...
@@ -222,19 +214,16 @@ async function outPutEnterpriseData(req, res) {
...
@@ -222,19 +214,16 @@ async function outPutEnterpriseData(req, res) {
result
.
push
(
subList
);
result
.
push
(
subList
);
});
});
res
.
success
({
data
:
result
});
let
name
=
`在孵企业
${
getTimeKey
()}
.xlsx`
;
res
.
success
({
name
,
data
:
result
});
}
}
async
function
outPutFinancingData
(
req
,
res
)
{
async
function
outPutFinancingData
(
req
,
res
)
{
let
reqConf
=
{
monthData
:
'String'
,
fuHuaQiName
:
'String'
,
fuHuaQiInvestment
:
'Number'
,
industry
:
'[Number]'
,
page
:
'Number'
,
type
:
'Number'
};
let
reqConf
=
{
monthData
:
'String'
,
fuHuaQiName
:
'String'
,
fuHuaQiInvestment
:
'Number'
,
industry
:
'[Number]'
,
type
:
'Number'
};
let
{
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
page
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
{
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
dataList
=
[];
let
dataList
=
await
financingBiz
.
outPutFinancingList
(
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
type
);
if
(
type
==
OUTPUTTYPE
.
全部数据
)
dataList
=
await
financingBiz
.
outPutFinancingList
(
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
);
else
{
let
baseData
=
await
financingBiz
.
financingList
(
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
page
);
dataList
=
baseData
.
dataList
;
}
let
keyList
=
[
let
keyList
=
[
"name"
,
"logonAdd"
,
"operatingAdd"
,
"financingAmount"
,
"investmentInstitutionsName"
,
"name"
,
"logonAdd"
,
"operatingAdd"
,
"financingAmount"
,
"investmentInstitutionsName"
,
...
@@ -253,20 +242,17 @@ async function outPutFinancingData(req, res) {
...
@@ -253,20 +242,17 @@ async function outPutFinancingData(req, res) {
result
.
push
(
subList
);
result
.
push
(
subList
);
});
});
res
.
success
({
data
:
result
});
let
name
=
`融资企业
${
getTimeKey
()}
.xlsx`
;
res
.
success
({
name
,
data
:
result
});
}
}
async
function
outPutMonthData
(
req
,
res
)
{
async
function
outPutMonthData
(
req
,
res
)
{
let
reqConf
=
{
state
:
'Number'
,
year
:
'Number'
,
month
:
'Number'
,
page
:
'Number'
,
type
:
'Number'
};
let
reqConf
=
{
state
:
'Number'
,
year
:
'Number'
,
month
:
'Number'
,
type
:
'Number'
};
let
{
state
,
year
,
month
,
page
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
{
state
,
year
,
month
,
type
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
dataList
=
[];
let
dataList
=
await
outPutMonthTableList
(
state
,
year
,
month
,
type
);
if
(
type
==
OUTPUTTYPE
.
全部数据
)
dataList
=
await
outPutMonthTableList
(
state
,
year
,
month
);
else
{
let
baseData
=
await
await
monthTableList
(
state
,
year
,
month
,
page
);
dataList
=
baseData
.
dataList
;
}
let
keyList
=
[
let
keyList
=
[
"operationName"
,
"operationName"
,
...
@@ -286,5 +272,7 @@ async function outPutMonthData(req, res) {
...
@@ -286,5 +272,7 @@ async function outPutMonthData(req, res) {
result
.
push
(
subList
);
result
.
push
(
subList
);
});
});
res
.
success
({
data
:
result
});
let
name
=
`月度任务
${
getTimeKey
()}
.xlsx`
;
res
.
success
({
name
,
data
:
result
});
}
}
\ No newline at end of file
src/util/dataInit.ts
View file @
cebf2675
...
@@ -104,11 +104,12 @@ async function initFuHuaQiData() {
...
@@ -104,11 +104,12 @@ async function initFuHuaQiData() {
};
};
for
(
let
i
=
0
;
i
<
12
;
i
++
)
{
for
(
let
i
=
0
;
i
<
12
;
i
++
)
{
if
(
i
==
10
)
continue
;
if
(
i
==
10
)
continue
;
let
item
=
subList
[
i
];
let
item
=
subList
[
i
];
let
key
=
titleMap
[
i
];
let
key
=
titleMap
[
i
];
let
value
=
item
;
let
value
=
item
;
if
(
i
==
2
)
{
if
(
i
==
2
)
{
addDataInfo
.
pwd
=
getPwdMd5
(
item
,
item
.
slice
(
item
.
length
-
6
));
let
itemStr
=
`
${
item
}
`
;
addDataInfo
.
pwd
=
getPwdMd5
(
itemStr
,
itemStr
.
slice
(
itemStr
.
length
-
6
));
}
}
if
(
i
==
3
)
{
if
(
i
==
3
)
{
value
=
FUHUAQILV
[
item
]
||
0
;
value
=
FUHUAQILV
[
item
]
||
0
;
...
...
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