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
0d97fa33
Commit
0d97fa33
authored
Apr 12, 2021
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资质查询 综合
parent
da83ef25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
3 deletions
+97
-3
center-channel/app/base/api/impl/action/icbcTools.js
+5
-2
center-channel/app/base/service/impl/trademark/icbcSve.js
+92
-1
No files found.
center-channel/app/base/api/impl/action/icbcTools.js
View file @
0d97fa33
...
@@ -36,8 +36,11 @@ class IcbcToolsAPI extends WEBBase {
...
@@ -36,8 +36,11 @@ class IcbcToolsAPI extends WEBBase {
case
"getCompanyIcpByName"
:
//工商icp证照查询
case
"getCompanyIcpByName"
:
//工商icp证照查询
opResult
=
await
this
.
icbcSve
.
getCompanyIcpByName
(
action_body
,
req
);
opResult
=
await
this
.
icbcSve
.
getCompanyIcpByName
(
action_body
,
req
);
break
;
break
;
case
"searchCertification"
:
//企业证书查询
// case "searchCertification"://企业证书查询
opResult
=
await
this
.
icbcSve
.
searchCertification
(
action_body
,
req
);
// opResult = await this.icbcSve.searchCertification(action_body,req);
// break;
case
"searchCertification"
:
//企业证书查询(综合)
opResult
=
await
this
.
icbcSve
.
getLicenseList
(
action_body
,
req
);
break
;
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
center-channel/app/base/service/impl/trademark/icbcSve.js
View file @
0d97fa33
...
@@ -85,6 +85,7 @@ class IcbcService extends AppServiceBase {
...
@@ -85,6 +85,7 @@ class IcbcService extends AppServiceBase {
"accessKey"
:
"111"
,
"accessKey"
:
"111"
,
"accessSecret"
:
"222"
"accessSecret"
:
"222"
}
}
req
.
headers
.
token
=
'sss'
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
if
(
ret
.
status
!=
1
)
{
if
(
ret
.
status
!=
1
)
{
return
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
return
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
...
@@ -94,8 +95,10 @@ class IcbcService extends AppServiceBase {
...
@@ -94,8 +95,10 @@ class IcbcService extends AppServiceBase {
url
=
settings
.
icNameUrl
()
+
"openPlatform/busenterprise/cloudapi"
;
url
=
settings
.
icNameUrl
()
+
"openPlatform/busenterprise/cloudapi"
;
//资质查询
//资质查询
let
data
=
{
let
data
=
{
// "path": "/apis/dst/patents/getLicense",
"path"
:
"/apis/dst/patents/certificate"
,
"path"
:
"/apis/dst/patents/certificate"
,
"name"
:
queryobj
.
companyName
"name"
:
queryobj
.
companyName
,
"pageNum"
:
1
};
};
let
rtn
=
await
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url
,
data
);
let
rtn
=
await
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url
,
data
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
if
(
!
rtn
||
!
rtn
.
stdout
)
{
...
@@ -121,6 +124,94 @@ class IcbcService extends AppServiceBase {
...
@@ -121,6 +124,94 @@ class IcbcService extends AppServiceBase {
}
}
/**
* 获取资质证书(集合)
* @param obj
* @param req
* @returns {Promise<void>}
*/
async
getLicenseList
(
obj
,
req
){
let
companyName
=
obj
.
companyName
;
let
url
=
settings
.
icNameUrl
()
+
'openPlatform/platform/getToken'
;
let
params
=
{
"accessKey"
:
"111"
,
"accessSecret"
:
"222"
}
req
.
headers
.
token
=
'sss'
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
if
(
ret
.
status
!=
1
)
{
return
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
}
let
token
=
ret
.
data
;
let
url2
=
settings
.
icNameUrl
()
+
"/openPlatform/busenterprise/cloudapi"
;
let
params1
=
{
"path"
:
"/apis/dst/patents/certificate"
,
"name"
:
companyName
,
"pageNum"
:
1
}
let
params2
=
{
"path"
:
"/apis/dst/patents/getLicense"
,
"name"
:
companyName
,
"pageNum"
:
1
}
let
params3
=
{
"companyName"
:
companyName
}
let
funcs
=
[];
funcs
.
push
(
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url2
,
params1
));
funcs
.
push
(
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url2
,
params2
));
funcs
.
push
(
this
.
getCompanyIcpByName
(
params3
,
req
));
let
results
=
await
Promise
.
all
(
funcs
);
if
(
results
.
length
==
0
){
return
system
.
getResultFail
(
-
1
,
'查询失败,请稍后再试'
);
}
let
ret1
=
JSON
.
parse
(
results
[
0
].
stdout
);
let
ret2
=
JSON
.
parse
(
results
[
1
].
stdout
);
let
ret3
=
results
[
2
];
let
resultData
=
[];
if
(
ret1
.
error_code
==
0
&&
ret1
.
result
.
items
.
length
>
0
){
for
(
let
i
=
0
;
i
<
ret1
.
result
.
items
.
length
;
i
++
){
let
d
=
ret1
.
result
.
items
[
i
];
let
obj
=
{
licencenumber
:
d
.
certNo
,
licencename
:
d
.
certificateName
,
startDate
:
d
.
startDate
,
endDate
:
d
.
endDate
,
detail
:
d
.
detail
};
resultData
.
push
(
obj
);
}
}
if
(
ret2
.
error_code
==
0
&&
ret2
.
result
.
items
.
length
>
0
){
for
(
let
i
=
0
;
i
<
ret2
.
result
.
items
.
length
;
i
++
){
let
d
=
ret2
.
result
.
items
[
i
];
let
obj
=
{
licencenumber
:
d
.
licencenumber
,
licencename
:
d
.
licencename
,
startDate
:
d
.
fromdate
,
endDate
:
d
.
todate
,
detail
:
d
.
detail
};
if
(
!
resultData
.
includes
(
obj
)){
resultData
.
push
(
obj
);
}
}
}
if
(
ret3
.
status
==
0
&&
ret3
.
data
.
list
.
length
>
0
){
for
(
let
i
=
0
;
i
<
ret3
.
data
.
list
.
length
;
i
++
){
let
d
=
ret3
.
data
.
list
[
i
];
let
obj
=
{
licencenumber
:
d
.
liscense
,
licencename
:
"icp备案"
,
examine_date
:
d
.
examine_date
};
resultData
.
push
(
obj
);
}
}
return
system
.
getResultSuccess
(
resultData
);
}
...
...
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