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
2727fda5
Commit
2727fda5
authored
Mar 04, 2021
by
任晓松
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/center-channel' into center-channel
parents
bca7c8aa
0d060841
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
21 deletions
+30
-21
center-channel/app/base/service/impl/common/gatewaypushlogSve.js
+7
-2
center-channel/app/base/service/impl/trademark/icbcSve.js
+10
-10
center-channel/app/base/service/impl/utilsSve/utilsResultSve.js
+6
-2
center-channel/app/base/system.js
+7
-7
No files found.
center-channel/app/base/service/impl/common/gatewaypushlogSve.js
View file @
2727fda5
...
@@ -28,7 +28,12 @@ class GatewaypushlogService extends ServiceBase {
...
@@ -28,7 +28,12 @@ class GatewaypushlogService extends ServiceBase {
}
}
var
url
=
settings
.
gatewayUrl
()
+
"action/intentionapi/springBoard"
;
var
url
=
settings
.
gatewayUrl
()
+
"action/intentionapi/springBoard"
;
var
rtn
=
await
self
.
execClient
.
execPost
(
requestdata
,
url
);
var
rtn
=
await
self
.
execClient
.
execPost
(
requestdata
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
var
data
=
rtn
try
{
data
=
JSON
.
parse
(
rtn
.
stdout
);
}
catch
(
e
)
{
console
.
error
(
e
)
}
if
(
data
.
success
)
{
if
(
data
.
success
)
{
icloginfo
.
pushStatus
=
"yts"
;
icloginfo
.
pushStatus
=
"yts"
;
}
else
{
}
else
{
...
@@ -45,7 +50,7 @@ class GatewaypushlogService extends ServiceBase {
...
@@ -45,7 +50,7 @@ class GatewaypushlogService extends ServiceBase {
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
dingClient
.
gatewayPushError
({
message
:
"Exception"
,
api
:
"center-channel/taskAliIcapi"
})
this
.
dingClient
.
gatewayPushError
({
message
:
"Exception"
,
api
:
"center-channel/taskAliIcapi"
,
error
})
return
system
.
getResultFail
(
-
1
,
error
);
return
system
.
getResultFail
(
-
1
,
error
);
}
}
}
}
...
...
center-channel/app/base/service/impl/trademark/icbcSve.js
View file @
2727fda5
...
@@ -75,10 +75,10 @@ class IcbcService extends AppServiceBase {
...
@@ -75,10 +75,10 @@ class IcbcService extends AppServiceBase {
if
(
!
queryobj
.
companyName
)
{
if
(
!
queryobj
.
companyName
)
{
return
system
.
getResultFail
(
-
1
,
'companyName can not be empty'
);
return
system
.
getResultFail
(
-
1
,
'companyName can not be empty'
);
}
}
var
hashValue
=
await
this
.
restClient
.
hget
(
this
.
searchCertificationData
,
queryobj
.
companyName
);
//
var hashValue = await this.restClient.hget(this.searchCertificationData, queryobj.companyName);
if
(
hashValue
)
{
//
if (hashValue) {
return
system
.
getResultSuccess
(
JSON
.
parse
(
hashValue
));
//
return system.getResultSuccess(JSON.parse(hashValue));
}
//
}
//获取token
//获取token
let
url
=
settings
.
icNameUrl
()
+
'openPlatform/platform/getToken'
;
let
url
=
settings
.
icNameUrl
()
+
'openPlatform/platform/getToken'
;
let
params
=
{
let
params
=
{
...
@@ -112,9 +112,9 @@ class IcbcService extends AppServiceBase {
...
@@ -112,9 +112,9 @@ class IcbcService extends AppServiceBase {
return
system
.
getResult
(
null
,
"restPostWithHAuthorizationUrl data is empty"
);
return
system
.
getResult
(
null
,
"restPostWithHAuthorizationUrl data is empty"
);
};
};
let
tmArray
=
[];
let
tmArray
=
[];
if
(
tmrtn
.
status
==
1
&&
tmrtn
.
data
)
{
var
tmResult
=
JSON
.
parse
(
tmrtn
.
stdout
);
var
tmResult
=
JSON
.
parse
(
tmrtn
.
data
);
if
(
tmResult
.
status
==
1
&&
tmResult
.
data
)
{
tmArray
=
this
.
utilsResultSve
.
formulaContinued
(
tmResult
);
tmArray
=
this
.
utilsResultSve
.
formulaContinued
(
tmResult
.
data
);
}
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
...
@@ -129,13 +129,13 @@ class IcbcService extends AppServiceBase {
...
@@ -129,13 +129,13 @@ class IcbcService extends AppServiceBase {
//对结果处理
//对结果处理
// "Tag": 1为qichacha,0为gsb
// "Tag": 1为qichacha,0为gsb
var
setValue
=
{};
var
setValue
=
{};
setValue
[
queryobj
.
companyName
]
=
JSON
.
stringify
(
item
);
//
setValue[queryobj.companyName] = JSON.stringify(item);
setValue
[
tm
]
=
JSON
.
stringify
(
tmArray
);
// setValue["trademarks"
] = JSON.stringify(tmArray);
// if (result.Tag == 1) {
// if (result.Tag == 1) {
// this.restClient.hmset(this.disposeCertificationData, setValue);
// this.restClient.hmset(this.disposeCertificationData, setValue);
// }
// }
this
.
restClient
.
hmset
(
this
.
searchCertificationData
,
setValue
);
this
.
restClient
.
hmset
(
this
.
searchCertificationData
,
setValue
);
return
system
.
getResult
(
item
);
return
system
.
getResult
(
{
"certificates"
:
item
,
"trademarks"
:
tmArray
}
);
}
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsResultSve.js
View file @
2727fda5
...
@@ -24,13 +24,17 @@ class utilsTlBankSve extends AppServiceBase {
...
@@ -24,13 +24,17 @@ class utilsTlBankSve extends AppServiceBase {
for
(
let
i
=
0
;
i
<
tms
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
tms
.
length
;
i
++
)
{
let
tmInfo
=
tms
[
i
];
let
tmInfo
=
tms
[
i
];
if
(
!
tmInfo
.
REGDATE
)
{
//注册公告日期
let
tm_expiry
=
''
;
if
(
!
tmInfo
.
MARKNAME
)
{
//REGDATE注册公告日期
continue
;
continue
;
}
}
if
(
tmInfo
.
REGDATE
)
{
let
zcrqFormat
=
new
Date
(
tmInfo
.
REGDATE
*
1000
);
//注册日期
let
zcrqFormat
=
new
Date
(
tmInfo
.
REGDATE
*
1000
);
//注册日期
zcrqFormat
.
setFullYear
(
zcrqFormat
.
getFullYear
()
+
10
);
//专用起始日期计算
zcrqFormat
.
setFullYear
(
zcrqFormat
.
getFullYear
()
+
10
);
//专用起始日期计算
zcrqFormat
.
setMonth
(
zcrqFormat
.
getMonth
());
//专用起始日期计算
zcrqFormat
.
setMonth
(
zcrqFormat
.
getMonth
());
//专用起始日期计算
zcrqFormat
.
setDate
(
zcrqFormat
.
getDate
());
//专用起始日期计算
zcrqFormat
.
setDate
(
zcrqFormat
.
getDate
());
//专用起始日期计算
tm_expiry
=
this
.
convertDate
(
zcrqFormat
);
//计算商标到期日
}
let
tmObject
=
{
let
tmObject
=
{
"tm_comName"
:
tmInfo
.
AGENTNAME
,
//代理机构
"tm_comName"
:
tmInfo
.
AGENTNAME
,
//代理机构
...
@@ -38,7 +42,7 @@ class utilsTlBankSve extends AppServiceBase {
...
@@ -38,7 +42,7 @@ class utilsTlBankSve extends AppServiceBase {
"tm_name"
:
tmInfo
.
MARKNAME
,
//商标名称
"tm_name"
:
tmInfo
.
MARKNAME
,
//商标名称
"tm_appDate"
:
tmInfo
.
APPDATE
,
//申请日期
"tm_appDate"
:
tmInfo
.
APPDATE
,
//申请日期
"tm_isInvalid"
:
tmInfo
.
ISINVALID
,
//状态
"tm_isInvalid"
:
tmInfo
.
ISINVALID
,
//状态
"tm_expiry"
:
t
his
.
convertDate
(
zcrqFormat
)
//商标到期日
"tm_expiry"
:
t
m_expiry
//商标到期日
}
}
result
.
push
(
tmObject
);
result
.
push
(
tmObject
);
}
}
...
...
center-channel/app/base/system.js
View file @
2727fda5
...
@@ -58,7 +58,7 @@ class System {
...
@@ -58,7 +58,7 @@ class System {
var
total
=
data
.
total
;
var
total
=
data
.
total
;
data
=
data
.
hits
;
data
=
data
.
hits
;
var
sources
=
[];
var
sources
=
[];
data
.
forEach
(
function
(
d
)
{
data
.
forEach
(
function
(
d
)
{
sources
.
push
(
d
.
_source
);
sources
.
push
(
d
.
_source
);
})
})
var
result
=
{
var
result
=
{
...
@@ -86,14 +86,14 @@ class System {
...
@@ -86,14 +86,14 @@ class System {
var
codes_count
=
aggs
.
ncl_one_codes_count
;
var
codes_count
=
aggs
.
ncl_one_codes_count
;
var
bucketlist
=
codes_count
.
buckets
;
var
bucketlist
=
codes_count
.
buckets
;
var
bucklist
=
[];
var
bucklist
=
[];
bucketlist
.
forEach
(
function
(
d
)
{
bucketlist
.
forEach
(
function
(
d
)
{
bucklist
.
push
(
d
);
bucklist
.
push
(
d
);
})
})
var
data
=
j
.
hits
;
var
data
=
j
.
hits
;
var
total
=
data
.
total
;
var
total
=
data
.
total
;
var
hit
=
data
.
hits
;
var
hit
=
data
.
hits
;
var
sources
=
[];
var
sources
=
[];
hit
.
forEach
(
function
(
d
)
{
hit
.
forEach
(
function
(
d
)
{
sources
.
push
(
d
.
_source
);
sources
.
push
(
d
.
_source
);
})
})
var
result
=
{
var
result
=
{
...
@@ -121,7 +121,7 @@ class System {
...
@@ -121,7 +121,7 @@ class System {
var
codes_count
=
aggs
.
ncl_one_codes_count
;
var
codes_count
=
aggs
.
ncl_one_codes_count
;
var
bucketlist
=
codes_count
.
buckets
;
var
bucketlist
=
codes_count
.
buckets
;
var
bucklist
=
[];
var
bucklist
=
[];
bucketlist
.
forEach
(
function
(
d
)
{
bucketlist
.
forEach
(
function
(
d
)
{
bucklist
.
push
(
d
);
bucklist
.
push
(
d
);
})
})
var
result
=
{
var
result
=
{
...
@@ -140,7 +140,7 @@ class System {
...
@@ -140,7 +140,7 @@ class System {
var
notice_count
=
aggs
.
notice_count
;
var
notice_count
=
aggs
.
notice_count
;
var
bucketlist
=
notice_count
.
buckets
;
var
bucketlist
=
notice_count
.
buckets
;
var
bucklist
=
[];
var
bucklist
=
[];
bucketlist
.
forEach
(
function
(
d
)
{
bucketlist
.
forEach
(
function
(
d
)
{
var
notice_issue
=
d
.
key
;
var
notice_issue
=
d
.
key
;
var
date
=
d
.
date_max
.
value
;
var
date
=
d
.
date_max
.
value
;
var
data
=
{
var
data
=
{
...
@@ -296,7 +296,7 @@ class System {
...
@@ -296,7 +296,7 @@ class System {
}
}
}
}
}
}
Date
.
prototype
.
Format
=
function
(
fmt
)
{
//author: meizz
Date
.
prototype
.
Format
=
function
(
fmt
)
{
//author: meizz
var
o
=
{
var
o
=
{
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"d+"
:
this
.
getDate
(),
//日
"d+"
:
this
.
getDate
(),
//日
...
@@ -313,7 +313,7 @@ Date.prototype.Format = function (fmt) { //author: meizz
...
@@ -313,7 +313,7 @@ Date.prototype.Format = function (fmt) { //author: meizz
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
return
fmt
;
return
fmt
;
}
}
System
.
exTime
=
4
*
3600
;
//缓存过期时间,4小时
System
.
exTime
=
4
*
3600
;
//缓存过期时间,4小时
System
.
objTable
=
{};
System
.
objTable
=
{};
...
...
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