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
0eb4686a
Commit
0eb4686a
authored
Mar 05, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
babff4c4
ec726a99
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
25 deletions
+30
-25
center-channel/app/base/api/impl/action/opNeed.js
+3
-0
center-channel/app/base/service/app.base.js
+6
-0
center-channel/app/base/service/impl/trademark/icbcSve.js
+7
-25
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
+14
-0
No files found.
center-channel/app/base/api/impl/action/opNeed.js
View file @
0eb4686a
...
...
@@ -60,6 +60,9 @@ class OpNeed extends APIBase {
case
"getStatisticsByProduct"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByProduct
(
pobj
);
break
;
case
"getNeedProductType"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getNeedProductType
(
pobj
);
break
;
case
"getStatisticsByArea"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByArea
(
pobj
);
break
;
...
...
center-channel/app/base/service/app.base.js
View file @
0eb4686a
...
...
@@ -245,6 +245,12 @@ class AppServiceBase {
returnType
:
'1'
,
opTitle
:
opType
+
"数据推送成功->"
+
opTitleDesc
});
// TODO 更改需求推送状态
if
(
opType
.
indexOf
(
'Need'
)
>=
0
&&
opType
.
indexOf
(
'Business'
)
>=
0
){
pobj
.
actionType
=
'updateNeedPushStatus'
;
let
url
=
settings
.
centerOrderUrl
()
+
'action/opNeed/springBoard'
;
let
result
=
await
this
.
execPostByTimeOut
(
null
,
pobj
,
url
,
null
,
null
,
60
);
}
// result.data = null;
return
result
;
}
...
...
center-channel/app/base/service/impl/trademark/icbcSve.js
View file @
0eb4686a
...
...
@@ -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
=
{
...
...
@@ -87,36 +87,20 @@ class IcbcService extends AppServiceBase {
}
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
if
(
ret
.
status
!=
1
)
{
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
return
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
}
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
,
'查询失败!!!'
);
...
...
@@ -125,17 +109,15 @@ class IcbcService extends AppServiceBase {
return
system
.
getResultFail
(
-
1
,
'查询失败'
);
}
let
item
=
result
.
result
.
items
;
//对结果处理
// "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
(
item
);
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
View file @
0eb4686a
...
...
@@ -407,6 +407,20 @@ class UtilsOpNeedService extends AppServiceBase {
}
/**
* 获取需求 的产品类型
* @param pobj
* @returns {Promise<void>}
*/
async
getNeedProductType
(
pobj
){
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
){
return
system
.
getResultFail
(
-
1
);
}
return
result
;
}
/**
* 需求量对比
* @param pobj
* @returns {Promise<void>}
...
...
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