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
9f81e528
Commit
9f81e528
authored
Mar 04, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
ec7185a7
2a04c537
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
21 deletions
+121
-21
center-channel/app/base/api/impl/auth/taskapi.js
+6
-0
center-channel/app/base/service/impl/common/signSve.js
+13
-11
center-channel/app/base/service/impl/trademark/icbcSve.js
+30
-9
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+21
-0
center-channel/app/base/service/impl/utilsSve/utilsResultSve.js
+50
-0
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
+1
-1
No files found.
center-channel/app/base/api/impl/auth/taskapi.js
View file @
9f81e528
...
...
@@ -116,5 +116,10 @@ class AccessAuthAPI extends APIBase {
return
system
.
getResultSuccess
();
}
async
taskSyncNeedBusiness
(
pobj
,
qobj
,
req
){
let
result
=
await
this
.
utilsNeedSve
.
syncNeedBusiness
();
return
result
;
}
}
module
.
exports
=
AccessAuthAPI
;
\ No newline at end of file
center-channel/app/base/service/impl/common/signSve.js
View file @
9f81e528
...
...
@@ -177,17 +177,18 @@ module.exports = SignService;
// }
// var obj={
// "bizId": "yiming_solution_test_0001",
// "isDirectBuy": 0,
// "orderNo": "yiming_order_test_0001",
// "phone": "18506015665",
// "userName": "张三",
// "companyName": "测试有限公司2",
// "description": "测试11111111",
// "area": "1",
// "price": "1100",
// "consultType": "5"
// "isDirectBuy":"1",
// "orderNo":"CR-9T8MhbouU8J-test0001",
// "phone":"15732031337",
// "area":"110100",
// "companyProperties":"有限公司",
// "taxpayerType":"一般纳税人",
// "consultType":"GSREG",
// "companyName":"公司名称",
// "engagedIndustry":"从事行业",
// "bizScope":"经营范围",
// "hasAddress":true
// };
// task.createSign(obj,"
5cdd926122894160o1q1e34us4738v76
").then(d=>{
// task.createSign(obj,"
7cbb892450174167b5c7e01we4716t51
").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// });
\ No newline at end of file
center-channel/app/base/service/impl/trademark/icbcSve.js
View file @
9f81e528
...
...
@@ -12,6 +12,8 @@ class IcbcService extends AppServiceBase {
this
.
disposeCertificationData
=
"disposeCertificationData"
;
//企业资质证书查询
this
.
searchCertificationData
=
"searchCertificationData"
;
//result工具类
this
.
utilsResultSve
=
system
.
getObject
(
"service.utilsSve.utilsResultSve"
);
}
//企业模糊查询
async
getCompanyListByVague
(
obj
,
req
)
{
...
...
@@ -80,24 +82,41 @@ class IcbcService extends AppServiceBase {
//获取token
let
url
=
settings
.
icNameUrl
()
+
'openPlatform/platform/getToken'
;
let
params
=
{
"accessKey"
:
"111"
,
"accessSecret"
:
"222"
"accessKey"
:
"111"
,
"accessSecret"
:
"222"
}
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
if
(
ret
.
status
!=
1
)
{
system
.
getResultFail
(
-
1
,
'获取开放平台token失败'
);
let
ret
=
await
this
.
opReqResult
(
url
,
params
,
req
);
if
(
ret
.
status
!=
1
)
{
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"
,
"path"
:
"/apis/dst/patents/certificate"
,
"name"
:
queryobj
.
companyName
}
let
rtn
=
await
this
.
execClient
.
restGetWithHAuthorizationUrl
(
token
,
url
,
data
);
};
//商标查询
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
=
[];
if
(
tmrtn
.
status
==
1
&&
tmrtn
.
data
)
{
var
tmResult
=
JSON
.
parse
(
tmrtn
.
data
);
tmArray
=
this
.
utilsResultSve
.
formulaContinued
(
tmResult
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
!
result
)
{
return
system
.
getResultFail
(
-
1
,
'查询失败!!!'
);
...
...
@@ -106,10 +125,12 @@ 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
[
tm
]
=
JSON
.
stringify
(
tmArray
);
// if (result.Tag == 1) {
// this.restClient.hmset(this.disposeCertificationData, setValue);
// }
...
...
@@ -128,4 +149,3 @@ class IcbcService extends AppServiceBase {
}
}
module
.
exports
=
IcbcService
;
\ No newline at end of file
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
9f81e528
...
...
@@ -1581,6 +1581,7 @@ class UtilsNeedService extends AppServiceBase {
}
//-----------接入百度ICP------end----------------------------------
//需求导入
async
importNeeds
(
pobj
,
req
){
let
url
=
this
.
centerOrderUrl
+
'action/need/springBoard'
;
if
(
!
pobj
.
actionBody
.
needsArr
){
...
...
@@ -1599,6 +1600,26 @@ class UtilsNeedService extends AppServiceBase {
}
return
system
.
getResult
(
result
.
data
.
data
);
}
/**
* 同步需求商机
* @param pobj
* @param qobj
* @param req
* @returns {Promise<{msg: *, data, bizmsg: *|string, status: number}>}
*/
async
syncNeedBusiness
(
pobj
,
qobj
,
req
){
let
url
=
this
.
centerOrderUrl
+
'task/taskAction/taskNeed'
;
let
data
=
{
identifyCode
:
'sync'
}
let
result
=
await
this
.
execPostByTimeOut
(
req
,
data
,
url
,
"json"
,
null
,
60
)
if
(
!
result
||
result
.
status
!=
0
)
{
return
system
.
getResult
(
null
,
result
.
msg
);
}
if
(
!
result
.
data
||
result
.
data
.
status
!=
0
)
{
return
system
.
getResult
(
null
,
result
.
data
.
msg
);
}
return
system
.
getResult
(
result
.
data
.
data
);
}
}
module
.
exports
=
UtilsNeedService
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsResultSve.js
0 → 100644
View file @
9f81e528
var
system
=
require
(
"../../../system"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
//外部请求结果校验以及相应工具处理类
class
utilsTlBankSve
extends
AppServiceBase
{
constructor
()
{
super
();
}
//格式化时间
convertDate
(
time
)
{
if
(
time
==
null
)
{
return
""
;
}
var
date
=
new
Date
(
Number
(
time
*
1000
));
var
y
=
1900
+
date
.
getYear
();
var
m
=
"0"
+
(
date
.
getMonth
()
+
1
);
var
d
=
"0"
+
date
.
getDate
();
return
y
+
"-"
+
m
.
substring
(
m
.
length
-
2
,
m
.
length
)
+
"-"
+
d
.
substring
(
d
.
length
-
2
,
d
.
length
);
}
//计算并返回指定字段
formulaContinued
(
tms
)
{
let
result
=
[];
for
(
let
i
=
0
;
i
<
tms
.
length
;
i
++
)
{
let
tmInfo
=
tms
[
i
];
if
(
!
tmInfo
.
REGDATE
)
{
//注册公告日期
continue
;
}
let
zcrqFormat
=
new
Date
(
tmInfo
.
REGDATE
*
1000
);
//注册日期
zcrqFormat
.
setFullYear
(
zcrqFormat
.
getFullYear
()
+
10
);
//专用起始日期计算
zcrqFormat
.
setMonth
(
zcrqFormat
.
getMonth
());
//专用起始日期计算
zcrqFormat
.
setDate
(
zcrqFormat
.
getDate
());
//专用起始日期计算
let
tmObject
=
{
"tm_comName"
:
tmInfo
.
AGENTNAME
,
//代理机构
"tm_img"
:
tmInfo
.
MARKIMAGE
,
//商标图片
"tm_name"
:
tmInfo
.
MARKNAME
,
//商标名称
"tm_appDate"
:
tmInfo
.
APPDATE
,
//申请日期
"tm_isInvalid"
:
tmInfo
.
ISINVALID
,
//状态
"tm_expiry"
:
this
.
convertDate
(
zcrqFormat
)
//商标到期日
}
result
.
push
(
tmObject
);
}
return
result
;
}
}
module
.
exports
=
utilsTlBankSve
;
\ No newline at end of file
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
View file @
9f81e528
...
...
@@ -613,7 +613,7 @@ class UtilsTmAliyunService extends AppServiceBase {
return
result
;
}
async
taskAliTmUpdate
()
{
//操作阿里商标更新任务---外部调用
async
taskAliTmUpdate
()
{
//操作阿里商标
(钉钉自主注册,没有上线)
更新任务---外部调用
var
pobj
=
{
actionBody
:
{}
};
var
dbAliAllTmListResult
=
await
this
.
getAllAliChannelTmDelivery
(
pobj
);
if
(
dbAliAllTmListResult
.
status
!=
0
)
{
...
...
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