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
bcca4b5b
Commit
bcca4b5b
authored
Mar 04, 2021
by
wangyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复资质查询接口
parent
2727fda5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
23 deletions
+7
-23
center-channel/app/base/service/impl/trademark/icbcSve.js
+7
-23
No files found.
center-channel/app/base/service/impl/trademark/icbcSve.js
View file @
bcca4b5b
...
...
@@ -75,10 +75,10 @@ class IcbcService extends AppServiceBase {
if
(
!
queryobj
.
companyName
)
{
return
system
.
getResultFail
(
-
1
,
'companyName can not be empty'
);
}
//
var hashValue = await this.restClient.hget(this.searchCertificationData, queryobj.companyName);
//
if (hashValue) {
//
return system.getResultSuccess(JSON.parse(hashValue));
//
}
var
hashValue
=
await
this
.
restClient
.
hget
(
this
.
searchCertificationData
,
queryobj
.
companyName
);
if
(
hashValue
)
{
return
system
.
getResultSuccess
(
JSON
.
parse
(
hashValue
));
}
//获取token
let
url
=
settings
.
icNameUrl
()
+
'openPlatform/platform/getToken'
;
let
params
=
{
...
...
@@ -92,31 +92,16 @@ class IcbcService extends AppServiceBase {
let
token
=
ret
.
data
;
url
=
settings
.
icNameUrl
()
+
"openPlatform/busenterprise/cloudapi"
;
let
tmUrl
=
settings
.
icNameUrl
()
+
"openPlatform/busservices/cloudApi"
//资质查询
//资质查询
let
data
=
{
"path"
:
"/apis/dst/patents/certificate"
,
"name"
:
queryobj
.
companyName
};
//商标查询
let
tmData
=
{
"path"
:
"getTrademarkInfo"
,
"entName"
:
queryobj
.
companyName
,
"pageNo"
:
1
,
//页码
"pageSize"
:
10
//每页显示最大数量,最大100
};
let
rtn
=
await
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url
,
data
);
let
tmrtn
=
await
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
tmUrl
,
tmData
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"restPostWithHAuthorizationUrl data is empty"
);
};
let
tmArray
=
[];
var
tmResult
=
JSON
.
parse
(
tmrtn
.
stdout
);
if
(
tmResult
.
status
==
1
&&
tmResult
.
data
)
{
tmArray
=
this
.
utilsResultSve
.
formulaContinued
(
tmResult
.
data
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
!
result
)
{
return
system
.
getResultFail
(
-
1
,
'查询失败!!!'
);
...
...
@@ -129,13 +114,12 @@ class IcbcService extends AppServiceBase {
//对结果处理
// "Tag": 1为qichacha,0为gsb
var
setValue
=
{};
// setValue[queryobj.companyName] = JSON.stringify(item);
// setValue["trademarks"] = JSON.stringify(tmArray);
setValue
[
queryobj
.
companyName
]
=
JSON
.
stringify
(
item
);
// if (result.Tag == 1) {
// this.restClient.hmset(this.disposeCertificationData, setValue);
// }
this
.
restClient
.
hmset
(
this
.
searchCertificationData
,
setValue
);
return
system
.
getResult
(
{
"certificates"
:
item
,
"trademarks"
:
tmArray
}
);
return
system
.
getResult
(
items
);
}
...
...
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