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
a6a82595
Commit
a6a82595
authored
Jan 15, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
1b0269d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
103 deletions
+12
-103
center-channel/app/base/api/impl/action/patentQuery.js
+4
-24
center-channel/app/base/service/impl/patent/patentycSve.js
+8
-79
No files found.
center-channel/app/base/api/impl/action/patentQuery.js
View file @
a6a82595
...
...
@@ -11,55 +11,35 @@ class PatentQueryAPI extends APIBase {
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
.
actionProcess
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
action_process
,
action_type
,
action_body
,
req
)
{
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"test"
:
//测试
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"CommomSearchbyApplicant"
:
//根据申请人查询聚合
opResult
=
await
this
.
patentSve
.
CommomSearchbyApplicant
(
action_body
,
req
);
break
;
case
"paCountByApplicantName"
:
//根据申请人获取专利量
opResult
=
await
this
.
patentSve
.
paCountByApplicantName
(
action_body
,
req
);
break
;
case
"paShortListByApplicantName"
:
//根据申请人获取专利详情列表
opResult
=
await
this
.
patentSve
.
paShortListByApplicantName
(
action_body
,
req
);
break
;
case
"paDetailsBypubNo"
:
//根据公开或授权号获取专利详情列表
opResult
=
await
this
.
patentSve
.
paDetailsBypubNo
(
action_body
,
req
);
break
;
case
"paDetailsByfilingNo"
:
//根据申请号获取专利详情列表
opResult
=
await
this
.
patentSve
.
paDetailsByfilingNo
(
action_body
,
req
);
break
;
case
"softwareCountByAuthor"
:
//根据公司名称得到软著量
opResult
=
await
this
.
patentSve
.
softwareCountByAuthor
(
action_body
,
req
);
break
;
case
"softwareListByAuthor"
:
//根据公司名称得到软著详情
opResult
=
await
this
.
patentSve
.
softwareListByAuthor
(
action_body
,
req
);
break
;
case
"softwareDetailsByregNum"
:
//根据登记号获取软著详情
opResult
=
await
this
.
patentSve
.
softwareDetailsByregNum
(
action_body
,
req
);
break
;
case
"worksCountByAuthor"
:
//根据公司名称得到著作权量
opResult
=
await
this
.
patentSve
.
worksCountByAuthor
(
action_body
,
req
);
break
;
case
"worksListByAuthor"
:
//根据公司名称得到著作权详情
opResult
=
await
this
.
patentSve
.
worksListByAuthor
(
action_body
,
req
);
break
;
case
"worksDetailsByregNum"
:
//根据登记号获取著作权详情
opResult
=
await
this
.
patentSve
.
worksDetailsByregNum
(
action_body
,
req
);
opResult
=
await
this
.
patentSve
.
opReqResult
(
pobj
,
req
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
center-channel/app/base/service/impl/patent/patentycSve.js
View file @
a6a82595
const
System
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
querystring
=
require
(
'querystring'
);
class
PatentycService
{
const
AppServiceBase
=
require
(
"../../app.base"
);
class
PatentycService
extends
AppServiceBase
{
constructor
()
{
super
();
this
.
zcApiUrl
=
settings
.
reqZcApi
();
this
.
execClient
=
System
.
getObject
(
"util.execClient"
);
};
async
opReqResult
(
pobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"action/patentQuery/springBoard"
;
async
opReqResult
(
reqUrl
,
queryobj
,
req
)
{
var
rtn
=
await
this
.
execClient
.
execPushDataPost
(
queryobj
,
reqUrl
,
req
.
headers
[
"token"
],
req
.
headers
[
"request-id"
]);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
return
data
;
};
//根据申请人查询聚合
async
CommomSearchbyApplicant
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/CommomSearchbyApplicant"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据申请人获取专利量
async
paCountByApplicantName
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/paCountByApplicantName"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据申请人获取专利详情列表
async
paShortListByApplicantName
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/paShortListByApplicantName"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据公开或授权号获取专利详情列表
async
paDetailsBypubNo
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/paDetailsBypubNo"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据申请号获取专利详情列表
async
paDetailsByfilingNo
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/paDetailsByfilingNo"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据公司名称得到软著量
async
softwareCountByAuthor
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/softwareCountByAuthor"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据公司名称得到软著详情
async
softwareListByAuthor
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/softwareListByAuthor"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据登记号获取软著详情
async
softwareDetailsByregNum
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/softwareDetailsByregNum"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据公司名称得到著作权量
async
worksCountByAuthor
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/worksCountByAuthor"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据公司名称得到著作权详情
async
worksListByAuthor
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/worksListByAuthor"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
//根据登记号获取著作权详情
async
worksDetailsByregNum
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/action/patentQuery/worksDetailsByregNum"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
};
var
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
}
}
module
.
exports
=
PatentycService
;
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