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
644d5b1c
Commit
644d5b1c
authored
Nov 12, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
93b7caa7
d62c2c7c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
32 deletions
+101
-32
center-channel/app/base/api/impl/action/tmQuery.js
+9
-0
center-channel/app/base/api/impl/opreceive/service.js
+15
-12
center-channel/app/base/service/impl/common/signSve.js
+16
-13
center-channel/app/base/service/impl/trademark/tmquerySve.js
+18
-0
center-channel/app/base/service/impl/utilsSve/utilsServiceSve.js
+7
-6
center-channel/app/base/utils/execClient.js
+36
-1
No files found.
center-channel/app/base/api/impl/action/tmQuery.js
View file @
644d5b1c
...
...
@@ -126,6 +126,15 @@ class TmQueryAPI extends WEBBase {
case
"tmtrend"
:
//商标申请及注册趋势
opResult
=
await
this
.
tmquerySve
.
tmtrend
(
action_body
,
req
);
break
;
case
"tmnclrankdetail"
:
//商标类别申请排名详情
opResult
=
await
this
.
tmquerySve
.
tmnclrankdetail
(
action_body
,
req
);
break
;
case
"tmcompanyrank"
:
//商标企业分布统计详情
opResult
=
await
this
.
tmquerySve
.
tmcompanyrank
(
action_body
,
req
);
break
;
case
"tmaddressrankdetail"
:
//商标地区分布统计排名详情
opResult
=
await
this
.
tmquerySve
.
tmaddressrankdetail
(
action_body
,
req
);
break
;
case
"findTrademarkNameAccuratejuhe"
:
//通过商标名来进行精准查询,商标注册地域/大类分布
opResult
=
await
this
.
tmquerySve
.
findTrademarkNameAccuratejuhe
(
action_body
,
req
);
break
;
...
...
center-channel/app/base/api/impl/opreceive/service.js
View file @
644d5b1c
...
...
@@ -76,26 +76,29 @@ class edi extends APIBase {
if
(
!
pobj
.
companyInfo
)
{
return
system
.
getResult
(
null
,
"companyInfo cannot be empty"
);
}
if
(
!
pobj
.
companyInfo
.
co
mpany
Name
)
{
return
system
.
getResult
(
null
,
"co
mpany
Name cannot be empty"
);
if
(
!
pobj
.
companyInfo
.
co
rp
Name
)
{
return
system
.
getResult
(
null
,
"co
rp
Name cannot be empty"
);
}
if
(
!
pobj
.
companyInfo
.
taxpayerType
)
{
return
system
.
getResult
(
null
,
"taxpayerType cannot be empty"
);
if
(
!
pobj
.
companyInfo
.
taxpayerType
Enum
)
{
return
system
.
getResult
(
null
,
"taxpayerType
Enum
cannot be empty"
);
}
if
(
!
pobj
.
companyInfo
.
acctgSystemId
)
{
return
system
.
getResult
(
null
,
"acctgSystemId cannot be empty"
);
}
if
(
!
pobj
.
companyInfo
.
companyFor
m
)
{
return
system
.
getResult
(
null
,
"
companyFor
m cannot be empty"
);
if
(
!
pobj
.
companyInfo
.
enterpriseFormEnu
m
)
{
return
system
.
getResult
(
null
,
"
enterpriseFormEnu
m cannot be empty"
);
}
if
(
!
pobj
.
companyInfo
.
industry
)
{
return
system
.
getResult
(
null
,
"
industry
cannot be empty"
);
if
(
!
pobj
.
companyInfo
.
taxIndustryId
)
{
return
system
.
getResult
(
null
,
"
taxIndustryId
cannot be empty"
);
}
if
(
!
pobj
.
companyInfo
.
tax
payerNumber
)
{
return
system
.
getResult
(
null
,
"tax
payerNumber
cannot be empty"
);
if
(
!
pobj
.
companyInfo
.
tax
No
)
{
return
system
.
getResult
(
null
,
"tax
No
cannot be empty"
);
}
if
(
!
pobj
.
companyInfo
.
companyArea
)
{
return
system
.
getResult
(
null
,
"companyArea cannot be empty"
);
if
(
!
pobj
.
companyInfo
.
serviceTypeEnum
)
{
return
system
.
getResult
(
null
,
"serviceTypeEnum cannot be empty"
);
}
if
(
!
pobj
.
companyInfo
.
taxClaimMethodEnum
)
{
return
system
.
getResult
(
null
,
"taxClaimMethodEnum cannot be empty"
);
}
return
system
.
getResultSuccess
()
}
...
...
center-channel/app/base/service/impl/common/signSve.js
View file @
644d5b1c
...
...
@@ -134,20 +134,23 @@ module.exports = SignService;
// "status":"16"
// }
// var obj = {
// "bizId":"OD2020110629779500",
// "contactMobile":"18550295628",
// "contactName":"范锋华",
// "timeUnit":"year",
// "quantity":1,
// "companyInfo":{
// "companyName":"苏州磐荣信息科技有限公司",
// "taxpayerType":"NORMAL_TAXPAYER",
// "acctgSystemId":"10001",
// "companyForm":"1",
// "industry":1,
// "taxpayerNumber":"123456789",
// "companyArea":"北京"
// "bizId":"OD2020110629779501",
// "companyInfo":{
// "companyName":"苏州磐荣信息科技有限公司",
// "taxpayerTypeEnum":"NORMAL_TAXPAYER",
// "acctgSystemId":"10001",
// "enterpriseFormEnum":"1",
// "taxIndustryId":1,
// "taxNo":"123456789",
// "serviceTypeEnum":"ACCOUTING",
// "taxClaimMethodEnum":"TAX_DECLARATION"
// },
// "contactMobile":"18550295628",
// "contactName":"范锋华",
// "timeUnit":"year",
// "quantity":1
// }
// }
// task.createSign(obj,"7cbb892450174167b5c7e01we4717z51").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
...
...
center-channel/app/base/service/impl/trademark/tmquerySve.js
View file @
644d5b1c
...
...
@@ -110,6 +110,24 @@ class TmqueryService {
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
}
//商标类别申请排名详情
async
tmnclrankdetail
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/trademark/tmqueryApi/tmnclrankdetail"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
}
//商标企业分布统计详情
async
tmcompanyrank
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/trademark/tmqueryApi/tmcompanyrank"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
}
//商标地区分布统计排名详情
async
tmaddressrankdetail
(
queryobj
,
req
)
{
var
url
=
this
.
zcApiUrl
+
"api/trademark/tmqueryApi/tmaddressrankdetail"
;
return
await
this
.
opReqResult
(
url
,
queryobj
,
req
);
}
//通过商标名来进行精准查询,商标注册地域/大类分布
async
findTrademarkNameAccuratejuhe
(
queryobj
,
req
){
var
url
=
this
.
zcApiUrl
+
"api/trademark/tmqueryApi/findTrademarkNameAccuratejuhe"
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsServiceSve.js
View file @
644d5b1c
...
...
@@ -89,13 +89,14 @@ class utils360Sve extends AppServiceBase {
"timeUnit"
:
pobj
.
actionBody
.
timeUnit
,
"quantity"
:
pobj
.
actionBody
.
quantity
,
"companyInfo"
:{
"co
mpanyName"
:
pobj
.
actionBody
.
companyInfo
.
company
Name
,
"taxpayerType
"
:
pobj
.
actionBody
.
companyInfo
.
taxpayerType
,
"co
rpName"
:
pobj
.
actionBody
.
companyInfo
.
corp
Name
,
"taxpayerType
Enum"
:
pobj
.
actionBody
.
companyInfo
.
taxpayerTypeEnum
,
"acctgSystemId"
:
pobj
.
actionBody
.
companyInfo
.
acctgSystemId
,
"companyForm"
:
pobj
.
actionBody
.
companyInfo
.
companyForm
,
"industry"
:
pobj
.
actionBody
.
companyInfo
.
industry
,
"taxpayerNumber"
:
pobj
.
actionBody
.
companyInfo
.
taxpayerNumber
,
"companyArea"
:
pobj
.
actionBody
.
companyInfo
.
companyArea
"enterpriseFormEnum"
:
pobj
.
actionBody
.
companyInfo
.
enterpriseFormEnum
,
"taxIndustryId"
:
pobj
.
actionBody
.
companyInfo
.
taxIndustryId
,
"taxNo"
:
pobj
.
actionBody
.
companyInfo
.
taxNo
,
"serviceTypeEnum"
:
pobj
.
actionBody
.
companyInfo
.
serviceTypeEnum
,
"taxClaimMethodEnum"
:
pobj
.
actionBody
.
companyInfo
.
taxClaimMethodEnum
}
},
appInfo
:
pobj
.
appInfo
...
...
center-channel/app/base/utils/execClient.js
View file @
644d5b1c
...
...
@@ -3,6 +3,7 @@ const util = require('util');
const
exec
=
util
.
promisify
(
require
(
'child_process'
).
exec
);
const
uuidv4
=
require
(
'uuid/v4'
);
var
settings
=
require
(
"../../config/settings"
);
const
axios
=
require
(
'axios'
);
class
ExecClient
{
constructor
()
{
this
.
cmdPostPattern
=
"curl --user admines:adminGSBes. -k -H 'Content-type: application/json' -d '{data}' {url}"
;
...
...
@@ -23,7 +24,10 @@ class ExecClient {
async
exec
(
cmd
)
{
//await后面表达式返回的promise对象, 是then的语法糖,await返回then函数的返回值
//异常需要try/catch自己捕获或外部catch捕获
const
{
stdout
,
stderr
}
=
await
exec
(
cmd
);
var
options
=
{
maxBuffer
:
1024
*
1024
*
20
};
const
{
stdout
,
stderr
}
=
await
exec
(
cmd
,
options
);
return
{
stdout
,
stderr
};
}
...
...
@@ -62,6 +66,13 @@ class ExecClient {
return
cmd
;
}
async
execPost
(
subData
,
url
)
{
if
(
settings
.
env
==
'dev'
){
const
rs
=
await
axios
.
post
(
url
,
subData
);
const
ret
=
{
stdout
:
JSON
.
stringify
(
rs
.
data
)
}
return
ret
;
}
let
cmd
=
this
.
FetchPostCmd
(
subData
,
url
);
var
result
=
await
this
.
exec
(
cmd
);
return
result
;
...
...
@@ -77,6 +88,15 @@ class ExecClient {
return
result
;
}
async
execPushDataPost
(
subData
,
url
,
token
,
requestId
)
{
if
(
settings
.
env
==
'dev'
){
axios
.
defaults
.
headers
[
'token'
]
=
token
;
// axios.defaults.headers['request-id'] = requestId;
const
rs
=
await
axios
.
post
(
url
,
subData
);
const
ret
=
{
stdout
:
JSON
.
stringify
(
rs
.
data
)
}
return
ret
;
}
let
cmd
=
this
.
FetchPushDataPostCmd
(
subData
,
url
,
token
,
requestId
);
var
options
=
{
maxBuffer
:
1024
*
1024
*
20
...
...
@@ -127,6 +147,21 @@ class ExecClient {
async
exec360GetToken
(
url
){
const
qs
=
require
(
'qs'
)
let
obj
=
{
"scope"
:
"smart_business"
,
"grant_type"
:
"client_credentials"
}
if
(
settings
.
env
==
'dev'
){
const
rs
=
await
axios
({
method
:
'post'
,
url
:
url
,
data
:
qs
.
stringify
(
obj
),
auth
:
{
username
:
"gongsibao"
,
password
:
"qPa4PsVsxbQ847i5pOKSmfPKrzRoNKqx"
}
})
const
ret
=
{
stdout
:
JSON
.
stringify
(
rs
.
data
)
}
return
ret
;
}
let
cmd
=
this
.
Fetch360PostCmd
(
qs
.
stringify
(
obj
),
url
);
console
.
log
(
cmd
);
var
result
=
await
this
.
exec
(
cmd
);
...
...
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