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
6d098050
Commit
6d098050
authored
Jan 14, 2020
by
高宇强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
c34218bd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
11 deletions
+103
-11
igirl-zcapi/app/base/api/impl/action/licenseQuery.js
+54
-0
igirl-zcapi/app/base/api/impl/action/patentQuery.js
+2
-2
igirl-zcapi/app/base/api/impl/patent/chinapatentsearch.js
+12
-9
igirl-zcapi/app/base/service/impl/licenses/licenseSve.js
+35
-0
No files found.
igirl-zcapi/app/base/api/impl/action/licenseQuery.js
0 → 100644
View file @
6d098050
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
class
LicenseQueryAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
liecseSve
=
system
.
getObject
(
"service.licenses.licenseSve"
);
}
/**
* 接口跳转-POST请求
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
.
actionType
,
pobj
.
actionBody
);
return
result
;
}
async
opActionProcess
(
action_type
,
action_body
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"test"
:
//测试
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"getLicenses"
:
//根据公司得到推荐要办的证书
opResult
=
await
this
.
liecseSve
.
getLicenses
(
action_body
);
break
;
// case "getLicenfgfg"://根据公司得到推荐要办的证书
// opResult = await this.liecseSve.getLicenfgfg(action_body);
// break;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
LicenseQueryAPI
;
var
tesk
=
new
LicenseQueryAPI
();
var
parm
=
{
actionType
:
"getLicenfgfg"
,
actionBody
:{
name
:
"上海盛霄云计算技术有限公司"
}
};
tesk
.
springBoard
(
parm
).
then
(
function
(
result
){
console
.
log
(
result
);
//console.log(result.data.data[0]);
}).
catch
(
function
(
e
){
console
.
log
(
e
);
});
\ No newline at end of file
igirl-zcapi/app/base/api/impl/action/patentQuery.js
View file @
6d098050
...
...
@@ -74,8 +74,8 @@ module.exports = PatentQueryAPI;
// var tesk = new PatentQueryAPI();
// var parm = {
// actionType:"
worksListByAuthor
",
// actionBody:{a
uthor:"胡超超
"}
// actionType:"
paShortListByApplicantName
",
// actionBody:{a
pplicant_name:"中国专利信息中心
"}
// };
// tesk.springBoard(parm).then(function(result){
// console.log(result);
...
...
igirl-zcapi/app/base/api/impl/patent/chinapatentsearch.js
View file @
6d098050
...
...
@@ -1155,12 +1155,13 @@ auther:sy
"filing_name"
,
"pub_status_now"
,
"filing_no"
,
"filing_
dat
e"
,
"gr_
dat
e"
,
"filing_
tim
e"
,
"gr_
tim
e"
,
"gr_no"
,
"pub_
dat
e"
,
"pub_
tim
e"
,
"pub_no"
,
"agency_name"
,
"applicant_name"
,
"inventor_name"
,
"main_ipc"
,
"abstr_text"
,
...
...
@@ -1252,12 +1253,13 @@ auther:sy
"filing_name"
,
"pub_status_now"
,
"filing_no"
,
"filing_
dat
e"
,
"gr_
dat
e"
,
"filing_
tim
e"
,
"gr_
tim
e"
,
"gr_no"
,
"pub_
dat
e"
,
"pub_
tim
e"
,
"pub_no"
,
"agency_name"
,
"applicant_name"
,
"inventor_name"
,
"main_ipc"
,
"abstr_text"
,
...
...
@@ -1336,12 +1338,13 @@ auther:sy
"filing_name"
,
"pub_status_now"
,
"filing_no"
,
"filing_
dat
e"
,
"gr_
dat
e"
,
"filing_
tim
e"
,
"gr_
tim
e"
,
"gr_no"
,
"pub_
dat
e"
,
"pub_
tim
e"
,
"pub_no"
,
"agency_name"
,
"applicant_name"
,
"inventor_name"
,
"main_ipc"
,
"abstr_text"
,
...
...
igirl-zcapi/app/base/service/impl/licenses/licenseSve.js
0 → 100644
View file @
6d098050
const
System
=
require
(
"../../../system"
);
// const ServiceBase = require("../../sve.base");
const
querystring
=
require
(
'querystring'
);
class
LicenseService
{
constructor
()
{
this
.
licenseUrl
=
"http://43.247.184.92:8111/gsb/api/Licenses"
;
};
async
getLicenses
(
obj
)
{
//根据公司得到推荐要办的证书
var
name
=
obj
.
name
==
null
?
""
:
obj
.
name
;
if
(
name
==
""
)
{
return
System
.
getResult2
(
null
,
"参数不能为空"
);
}
var
params
=
{
"name"
:
name
};
var
rc
=
System
.
getObject
(
"util.execClient"
);
//var data = querystring.stringify(params);
var
rtn
=
null
;
try
{
rtn
=
await
rc
.
execPost
(
params
,
this
.
licenseUrl
);
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
System
.
getResult2
(
result
,
null
);
}
catch
(
e
)
{
return
System
.
getResult2
(
null
,
"获取数据出错"
);
}
};
}
module
.
exports
=
LicenseService
;
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