Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
e4db9aa0
Commit
e4db9aa0
authored
Jan 16, 2020
by
高宇强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
d1638a61
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
1 deletions
+112
-1
igirl-zcapi/app/base/api/impl/action/enterpriseQuery.js
+3
-0
igirl-zcapi/app/base/service/impl/enterprise/enterpriseSve.js
+109
-1
No files found.
igirl-zcapi/app/base/api/impl/action/enterpriseQuery.js
View file @
e4db9aa0
...
...
@@ -52,6 +52,9 @@ class EnterpriseQueryAPI extends APIBase {
case
"getQccBranches"
:
//获取企业的分支机构(从企查查获取)
opResult
=
await
this
.
enterSve
.
getQccBranches
(
action_body
);
break
;
case
"getcountAll"
:
//获取企业所有证照数量
opResult
=
await
this
.
enterSve
.
getcountAll
(
action_body
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
igirl-zcapi/app/base/service/impl/enterprise/enterpriseSve.js
View file @
e4db9aa0
...
...
@@ -9,8 +9,116 @@ class EnterpriseService {
this
.
gameUrl
=
settings
.
reqEsAddrIc
()
+
"enterprise_chain_game/_search"
;
this
.
ipUrl
=
settings
.
reqEsAddrIc
()
+
"bigdata_ip_back/_search"
;
this
.
qccUrl
=
"http://api.qichacha.com/ECIV4/GetDetailsByName"
;
this
.
patentApi
=
System
.
getObject
(
"api.patent.chinapatentsearch"
);
this
.
copyApi
=
System
.
getObject
(
"api.patent.copyrightsearch"
);
};
async
getcountAll
(
obj
){
//获取企业所有证照数量
try
{
var
author
=
obj
.
author
==
null
||
obj
.
author
==
""
||
obj
.
author
==
"undefined"
?
""
:
obj
.
author
;
if
(
author
==
""
)
{
return
System
.
getResult2
(
null
,
"企业名称不能为空"
);
}
author
=
await
this
.
getConvertSemiangleStr
(
author
);
var
resdict
=
{
"知产证照"
:
0
,
"互联网经营"
:
0
,
"食品"
:
0
,
"网络文化"
:
0
,
"特种资质"
:
0
}
var
parms
=
{
"applicant_name"
:
author
}
var
licenses
=
[];
var
patentCount
=
0
;
var
res
=
await
this
.
patentApi
.
paCountByApplicantName
(
parms
);
if
(
res
.
status
==
0
){
patentCount
=
res
.
data
;
}
var
softCount
=
0
;
res
=
await
this
.
copyApi
.
softwareCountByAuthor
(
obj
);
if
(
res
.
status
==
0
){
softCount
=
res
.
data
;
}
var
worksCount
=
0
;
res
=
await
this
.
copyApi
.
worksCountByAuthor
(
obj
);
if
(
res
.
status
==
0
){
worksCount
=
res
.
data
;
}
resdict
[
"知产证照"
]
=
patentCount
+
softCount
+
worksCount
;
res
=
await
this
.
gxCountByAuthor
(
obj
);
var
gxCount
=
0
;
if
(
res
.
status
==
0
){
gxCount
=
res
.
data
;
}
resdict
[
"特种资质"
]
=
gxCount
;
parms
=
{
"author"
:
author
,
"type"
:
"网络游戏出版备案"
}
res
=
await
this
.
gameCountByAuthor
(
parms
);
var
game1Count
=
0
;
var
game2Count
=
0
;
if
(
res
.
status
==
0
){
game1Count
=
res
.
data
;
}
parms
=
{
"author"
:
author
,
"type"
:
"网络游戏运营备案"
}
res
=
await
this
.
gameCountByAuthor
(
parms
);
if
(
res
.
status
==
0
){
game2Count
=
res
.
data
;
}
res
=
await
this
.
licenseCountByAuthor
(
obj
);
var
webCount
=
0
;
var
gbcount
=
0
;
var
ICPCount
=
0
;
var
IDCCount
=
0
;
var
EDICount
=
0
;
if
(
res
.
status
==
0
){
for
(
var
index
=
0
;
index
<
res
.
data
.
data
.
length
;
index
++
){
var
temp
=
res
.
data
.
data
[
index
];
if
(
temp
){
if
(
temp
[
"key"
]
==
"网络文化经营许可证"
){
webCount
=
temp
[
"doc_count"
];
}
else
if
(
temp
[
"key"
]
==
"广播电视节目制作经营许可证"
){
gbcount
=
temp
[
"doc_count"
];
}
else
if
(
temp
[
"key"
]
==
"ICP许可证"
){
ICPCount
=
temp
[
"doc_count"
];
}
else
if
(
temp
[
"key"
]
==
"IDC许可证"
){
IDCCount
=
temp
[
"doc_count"
];
}
else
if
(
temp
[
"key"
]
==
"EDI许可证"
){
EDICount
=
temp
[
"doc_count"
];
}
}
}
}
resdict
[
"互联网经营"
]
=
ICPCount
+
IDCCount
+
EDICount
;
resdict
[
"网络文化"
]
=
webCount
+
gbcount
+
game1Count
+
game2Count
;
return
System
.
getResult2
(
resdict
,
null
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
System
.
getResult2
(
null
,
"获取数据出错"
);
}
}
async
getQccBranches
(
obj
){
//获取企业的分支机构(从企查查获取)
var
author
=
obj
.
author
==
null
||
obj
.
author
==
""
||
obj
.
author
==
"undefined"
?
""
:
obj
.
author
;
if
(
author
==
""
)
{
...
...
@@ -497,7 +605,7 @@ module.exports = EnterpriseService;
// var parm = {
// author: "淘宝(中国)软件有限公司"
// };
// tesk.
getQccBranches
(parm).then(function (result) {
// tesk.
GetcountAll
(parm).then(function (result) {
// console.log(result);
// // console.log(result.data.data[0]);
// }).catch(function (e) {
...
...
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