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
c0643983
Commit
c0643983
authored
Feb 10, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
9e00446c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
18 deletions
+31
-18
enterprise.ts
src/biz/enterprise/enterprise.ts
+22
-13
enterprise.ts
src/data/enterprise/enterprise.ts
+7
-1
admin.ts
src/routers/admin.ts
+2
-4
No files found.
src/biz/enterprise/enterprise.ts
View file @
c0643983
...
@@ -10,9 +10,9 @@ import { EnterpriseInfoConfig } from "../../config/ojbectResultKeyConfig";
...
@@ -10,9 +10,9 @@ import { EnterpriseInfoConfig } 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
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
createEnterprise
,
deleteEnterprise
,
findEnterpriseCount
,
findEnterpriseByUscc
,
findEnterpriseList
,
findEnterpriseListByFuHuaQiUsccName
}
from
"../../data/enterprise/enterprise"
;
import
{
createEnterprise
,
deleteEnterprise
,
findEnterpriseCount
,
findEnterpriseByUscc
,
findEnterpriseList
,
findEnterpriseListByFuHuaQiUsccName
,
查询所有已绑定过的孵化器
id
}
from
"../../data/enterprise/enterprise"
;
import
{
EnterpriseListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
EnterpriseListConfig
}
from
"../../config/ojbectResultKeyConfig"
;
import
{
findFuHuaQiByUSCC
}
from
"../../data/fuHuaQi/fuhuaqi"
;
import
{
find
AllFuHuaQi
,
find
FuHuaQiByUSCC
}
from
"../../data/fuHuaQi/fuhuaqi"
;
/**
/**
...
@@ -185,18 +185,27 @@ export async function enterpriseList(time:string, fuHuaQiUscc:string, industry,
...
@@ -185,18 +185,27 @@ export async function enterpriseList(time:string, fuHuaQiUscc:string, industry,
}
}
export
async
function
getAffiliationFuHuaQi
(
fuHuaQiUscc
:
string
)
{
export
async
function
getAffiliationFuHuaQi
()
{
let
dataList
=
[];
let
dataList
=
[];
if
(
fuHuaQiUscc
.
length
>
0
)
{
let
list
=
await
查询所有已绑定过的孵化器
id
();
let
dataBaseInfo
=
await
findEnterpriseListByFuHuaQiUsccName
(
fuHuaQiUscc
);
let
uscc
;
let
allList
=
await
findAllFuHuaQi
();
dataBaseInfo
.
forEach
(
async
info
=>
{
let
distinctMap
=
{};
// {uscc:name}
uscc
=
info
.
fuHuaQiUscc
;
allList
.
forEach
(
info
=>
{
})
distinctMap
[
info
.
uscc
]
=
info
.
name
;
});
let
fuHuaQiInfo
=
await
findFuHuaQiByUSCC
(
uscc
);
dataList
.
push
(
fuHuaQiInfo
.
name
)
let
result
=
[];
}
list
.
forEach
(
fuHuaQiUscc
=>
{
let
fuHuaQiName
=
distinctMap
[
fuHuaQiUscc
];
if
(
fuHuaQiName
)
{
result
.
push
({
name
:
fuHuaQiName
,
uscc
:
fuHuaQiUscc
});
}
});
return
{
dataList
}
return
{
dataList
}
}
}
src/data/enterprise/enterprise.ts
View file @
c0643983
...
@@ -96,7 +96,7 @@ export async function createEnterprise(fuHuaQiUscc:string, taskId:string, param)
...
@@ -96,7 +96,7 @@ export async function createEnterprise(fuHuaQiUscc:string, taskId:string, param)
* @returns number 孵化器拥有的企业数量
* @returns number 孵化器拥有的企业数量
*/
*/
export
async
function
findEnterpriseCountByFuHuaQiUscc
(
fuHuaQiUscc
:
string
)
{
export
async
function
findEnterpriseCountByFuHuaQiUscc
(
fuHuaQiUscc
:
string
)
{
return
await
enterpriseModel
.
count
({
fuHuaQiUscc
}).
exec
();
return
await
enterpriseModel
.
find
({
fuHuaQiUscc
}).
count
();
}
}
...
@@ -164,3 +164,8 @@ export async function findEnterpriseInfoByName(name:string) {
...
@@ -164,3 +164,8 @@ export async function findEnterpriseInfoByName(name:string) {
export
async
function
findEnterpriseListByFuHuaQiUsccName
(
fuHuaQiUscc
:
string
)
{
export
async
function
findEnterpriseListByFuHuaQiUsccName
(
fuHuaQiUscc
:
string
)
{
return
await
enterpriseModel
.
find
({
fuHuaQiUscc
});
return
await
enterpriseModel
.
find
({
fuHuaQiUscc
});
}
}
export
async
function
查询所有已绑定过的孵化器
id
()
{
return
await
enterpriseModel
.
distinct
(
'fuHuaQiUscc'
);
}
\ No newline at end of file
src/routers/admin.ts
View file @
c0643983
...
@@ -136,9 +136,6 @@ async function addUser(req, res) {
...
@@ -136,9 +136,6 @@ async function addUser(req, res) {
async
function
affiliationFuHuaQi
(
req
,
res
)
{
async
function
affiliationFuHuaQi
(
req
,
res
)
{
let
reqConf
=
{
fuHuaQiUscc
:
'String'
};
let
result
=
await
enterpriseBiz
.
getAffiliationFuHuaQi
();
let
{
fuHuaQiUscc
}
=
checkParamaterType
(
reqConf
,
req
.
body
);
let
result
=
await
enterpriseBiz
.
getAffiliationFuHuaQi
(
fuHuaQiUscc
);
res
.
success
(
result
);
res
.
success
(
result
);
}
}
\ No newline at end of file
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