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
f04a430e
Commit
f04a430e
authored
Feb 10, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修好一堆bug
parent
7cdf762d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
18 deletions
+26
-18
enterprise.ts
src/biz/enterprise/enterprise.ts
+18
-12
financing.ts
src/biz/enterprise/financing.ts
+5
-3
admin.ts
src/routers/admin.ts
+3
-3
No files found.
src/biz/enterprise/enterprise.ts
View file @
f04a430e
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
import
{
MoveInEnterpriseParamConfig
,
RegisterEnterpriseParamConfig
}
from
"../../config/checkParamConfig"
;
import
{
MoveInEnterpriseParamConfig
,
RegisterEnterpriseParamConfig
}
from
"../../config/checkParamConfig"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
EnterpriseInfoConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
EnterpriseInfoConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
createEnterprise
,
deleteEnterprise
,
findEnterpriseCount
,
findEnterpriseByUscc
,
findEnterpriseList
,
groupFindEnterprise
}
from
"../../data/enterprise/enterprise"
;
import
{
createEnterprise
,
deleteEnterprise
,
findEnterpriseCount
,
findEnterpriseByUscc
,
findEnterpriseList
}
from
"../../data/enterprise/enterprise"
;
import
{
EnterpriseListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
EnterpriseListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
checkChange
,
checkParamater
,
extractData
,
getTaskId
}
from
"../../util/tools"
import
{
checkChange
,
checkParamater
,
extractData
,
getTaskId
}
from
"../../util/tools"
import
{
FUHUAQILV
}
from
"../../config/enum"
;
import
moment
=
require
(
"moment"
)
;
/**
/**
...
@@ -153,25 +153,32 @@ export async function deleteEnterpriseByUscc(uscc:string) {
...
@@ -153,25 +153,32 @@ export async function deleteEnterpriseByUscc(uscc:string) {
* @param page 页数
* @param page 页数
* @returns {dataList:[], count:0} dataList=数据列表 count:条件筛选下的数据总数
* @returns {dataList:[], count:0} dataList=数据列表 count:条件筛选下的数据总数
*/
*/
export
async
function
enterpriseList
(
time
:
number
,
fuHuaQiUscc
:
string
,
industry
:
number
,
isNaturalPersonHolding
:
boolean
,
page
:
number
)
{
export
async
function
enterpriseList
(
time
:
string
,
fuHuaQiUscc
:
string
,
industry
,
isNaturalPersonHolding
:
number
,
page
:
number
)
{
let
selectParam
:
any
=
{};
let
selectParam
:
any
=
{};
if
(
time
.
length
>
0
)
{
let
startT
=
moment
(
time
).
startOf
(
'month'
).
valueOf
();
let
endT
=
moment
(
time
).
endOf
(
'month'
).
valueOf
();
selectParam
[
'$or'
]
=
[
{
"firstIncubationTime"
:{
'$gt'
:
startT
,
'$lt'
:
endT
}},
{
"timeOfImmigration"
:{
'$gt'
:
startT
,
'$lt'
:
endT
}},
];
}
if
(
time
)
selectParam
.
logonTime
=
time
;
selectParam
.
timeOfImmigration
=
time
;
if
(
time
)
selectParam
.
logonTime
=
time
;
selectParam
.
timeOfImmigration
=
time
;
if
(
fuHuaQiUscc
)
selectParam
.
fuHuaQiUscc
=
fuHuaQiUscc
;
if
(
fuHuaQiUscc
)
selectParam
.
fuHuaQiUscc
=
fuHuaQiUscc
;
if
(
industry
)
selectParam
.
industry
=
industry
;
if
(
industry
.
length
>
0
)
selectParam
.
industry
=
industry
;
if
(
isNaturalPersonHolding
)
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
;
if
(
isNaturalPersonHolding
==
2
||
isNaturalPersonHolding
==
3
)
{
selectParam
.
isNaturalPersonHolding
=
isNaturalPersonHolding
==
2
?
true
:
false
;
let
enterpriseMap
=
await
groupFindEnterprise
();
}
let
dataBaseList
=
await
findEnterpriseList
(
selectParam
,
(
page
-
1
)
*
10
);
let
dataBaseList
=
await
findEnterpriseList
(
selectParam
,
(
page
-
1
)
*
10
);
let
count
=
await
findEnterpriseCount
(
selectParam
);
let
count
=
await
findEnterpriseCount
(
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
dataBaseList
.
forEach
(
info
=>
{
dataBaseList
.
forEach
(
info
=>
{
let
changeData
=
extractData
(
EnterpriseListConfig
,
info
);
let
changeData
=
extractData
(
EnterpriseListConfig
,
info
);
const
Count
=
enterpriseMap
[
info
.
uscc
]
||
0
;
dataList
.
push
(
changeData
);
dataList
.
push
(
changeData
);
});
});
dataBaseList
.
isNaturalPersonHolding
=
FUHUAQILV
[
dataBaseList
.
isNaturalPersonHolding
];
dataBaseList
.
lv
=
FUHUAQILV
[
dataBaseList
.
lv
];
return
{
count
,
dataList
};
return
{
count
,
dataList
};
}
}
\ No newline at end of file
src/biz/enterprise/financing.ts
View file @
f04a430e
...
@@ -143,14 +143,13 @@ export async function getFuHuaQiEnterpriseForSelect(uscc:string) {
...
@@ -143,14 +143,13 @@ export async function getFuHuaQiEnterpriseForSelect(uscc:string) {
* @param page 页数
* @param page 页数
* @returns
* @returns
*/
*/
export
async
function
financingList
(
monthData
:
string
,
fuHuaQiName
:
string
,
industry
,
fuHuaQiInvestment
:
boolean
,
page
:
number
)
{
export
async
function
financingList
(
monthData
:
string
,
fuHuaQiName
:
string
,
industry
,
fuHuaQiInvestment
:
number
,
page
:
number
)
{
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
=
{};
let
selectParam
:
any
=
{};
if
(
monthData
.
length
>
0
)
{
if
(
monthData
.
length
>
0
)
{
...
@@ -160,7 +159,10 @@ export async function financingList(monthData:string, fuHuaQiName:string, indust
...
@@ -160,7 +159,10 @@ export async function financingList(monthData:string, fuHuaQiName:string, indust
}
}
if
(
industry
.
length
>
0
)
selectParam
.
industry
=
industry
;
if
(
industry
.
length
>
0
)
selectParam
.
industry
=
industry
;
if
(
fuHuaQiUscc
.
length
>
0
)
selectParam
.
fuHuaQiUscc
=
fuHuaQiUscc
;
if
(
fuHuaQiUscc
.
length
>
0
)
selectParam
.
fuHuaQiUscc
=
fuHuaQiUscc
;
selectParam
.
fuHuaQiInvestment
=
fuHuaQiInvestment
;
if
(
fuHuaQiInvestment
==
2
||
fuHuaQiInvestment
==
3
)
{
selectParam
.
fuHuaQiInvestment
=
fuHuaQiInvestment
==
2
?
true
:
false
;
}
let
dataBaseList
=
await
findFinancingList
(
selectParam
,
(
page
-
1
)
*
10
);
let
dataBaseList
=
await
findFinancingList
(
selectParam
,
(
page
-
1
)
*
10
);
let
count
=
await
findFinancingCount
(
selectParam
);
let
count
=
await
findFinancingCount
(
selectParam
);
...
...
src/routers/admin.ts
View file @
f04a430e
...
@@ -86,10 +86,10 @@ async function getMonthList(req, res) {
...
@@ -86,10 +86,10 @@ async function getMonthList(req, res) {
/**
/**
* 后台管理 获取融资企业信息列表
* 后台管理 获取融资企业信息列表
* @param req
* @param req
* @param res
* @param res
*/
*/
async
function
getFinancingList
(
req
,
res
)
{
async
function
getFinancingList
(
req
,
res
)
{
let
reqConf
=
{
monthData
:
'String'
,
fuHuaQiName
:
'String'
,
fuHuaQiInvestment
:
'
Boolean
'
,
industry
:
'[Number]'
,
page
:
'Number'
};
let
reqConf
=
{
monthData
:
'String'
,
fuHuaQiName
:
'String'
,
fuHuaQiInvestment
:
'
Number
'
,
industry
:
'[Number]'
,
page
:
'Number'
};
let
{
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
page
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
{
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
page
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
result
=
await
financingBiz
.
financingList
(
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
page
);
let
result
=
await
financingBiz
.
financingList
(
monthData
,
fuHuaQiName
,
industry
,
fuHuaQiInvestment
,
page
);
...
@@ -103,7 +103,7 @@ async function getMonthList(req, res) {
...
@@ -103,7 +103,7 @@ async function getMonthList(req, res) {
* @param res
* @param res
*/
*/
async
function
getEnterpriseList
(
req
,
res
)
{
async
function
getEnterpriseList
(
req
,
res
)
{
let
reqConf
=
{
time
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'
Boolean
'
,
page
:
'Number'
};
let
reqConf
=
{
time
:
'Number'
,
fuHuaQiUscc
:
'String'
,
industry
:
'[Number]'
,
isNaturalPersonHolding
:
'
Number
'
,
page
:
'Number'
};
let
{
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
{
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
result
=
await
enterpriseBiz
.
enterpriseList
(
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
);
let
result
=
await
enterpriseBiz
.
enterpriseList
(
time
,
fuHuaQiUscc
,
industry
,
isNaturalPersonHolding
,
page
);
...
...
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