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
81b06da3
Commit
81b06da3
authored
Aug 26, 2020
by
gxfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fgx
parent
2f7c5dfc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
48 deletions
+81
-48
center-manage/app/base/service/impl/common/channelhandlers/tx.js
+81
-48
No files found.
center-manage/app/base/service/impl/common/channelhandlers/tx.js
View file @
81b06da3
...
...
@@ -562,7 +562,6 @@ class TxHandler {
"data"
:
null
}
}
}
catch
(
error
)
{
return
{
"requestId"
:
datajson
.
requestId
,
...
...
@@ -573,64 +572,77 @@ class TxHandler {
}
}
}
// async createLeads(datajson) {//财税需求处理
// try {
// var cachestr = sha235(JSON.stringify(datajson));
// var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
// if (cacheInfo && cacheInfo != 'undefined') {
// return {
// "status": 1, //1代表成功,否则失败
// "msg": "已处理成功!",
// "data": "",
// "requestId": ""
// }
// }
// else {
// var rc = system.getObject("util.execClient");
// var requrl = this.icUrl + "/bizoptCtl/insertInfo";//这个地方要改
// var params = {
// "businessMode": datajson.actionBody.NeedNum,//需求编号
// "servicerName": datajson.actionBody.ServicerName,//服务商编码
// "serviceCode": datajson.actionBody.RegionId,//服务地区编码
// "serviceName": datajson.actionBody.RegionName,//服务地区名字,需要转换
// //"contactsName": datajson.actionBody.ContactsName,
// "contactsPhone": datajson.actionBody.ContactsMobile,//联系人电话
// "businessType": datajson.actionBody.ConsultType,//需求类型
// "businessName": datajson.actionBody.ConsultTypeName,//需求名称
// "currentStatus": "beforeSubmission",
// "channelSource": "tencentCloud",//渠道
// "channelNumber": "tx"
// }
// }
// }
// catch (error) {
// return system.getResultError(error);
// }
//获取融易算服务实例到队列 进行数据更新
async
ServiceUpdate
(
datajson
)
{
try
{
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
requrl
=
this
.
queueUrl
;
var
params
=
{
"actionType"
:
"produceData"
,
"actionBody"
:
{
"pushUrl"
:
this
.
bookUrl
+
"/deliverybillCtl"
,
"actionType"
:
"updateServer"
,
"identifyCode"
:
"book-manage"
,
"messageBody"
:
datajson
,
"headData"
:
{
'Authorization'
:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJvcnpaWmhXRXBKNVVFZzRZUU5uUmlyVEJXa1FQbnZ6UyIsImlhdCI6MTU5MjcwOTYzNn0.TWk_F6Tz3fRMqspoG24VSt5RiC4ldFembFYcLcAbowE'
,
'XAPPKEY'
:
'647a68c9-da01-40d3-9763-1ffa0f64cf3f'
}
}
}
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
j
.
status
==
1
)
{
return
{
"requestId"
:
datajson
.
requestId
,
"success"
:
true
,
"errorCode"
:
0
,
"errorMsg"
:
"ok"
,
"data"
:
null
}
}
else
{
return
{
"requestId"
:
datajson
.
requestId
,
"success"
:
false
,
"errorCode"
:
-
1
,
"errorMsg"
:
rtn
.
stderr
,
"data"
:
null
}
}
}
catch
(
error
)
{
return
{
"requestId"
:
datajson
.
requestId
,
"success"
:
false
,
"errorCode"
:
-
1
,
"errorMsg"
:
error
,
"data"
:
null
}
}
}
// }
async
LeadsCreate
(
datajson
)
{
try
{
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
requrl
=
this
.
queueUrl
//改队列
var
params
=
{
"actionType"
:
"produceData"
,
"actionBody"
:
{
"pushUrl"
:
this
.
icUrl
+
"/bizOptCtl"
,
"actionType"
:
"insertInfo"
,
"identifyCode"
:
"book-manage"
,
"messageBody"
:
datajson
,
"actionType"
:
"produceData"
,
"actionBody"
:
{
"pushUrl"
:
this
.
icUrl
+
"/bizOptCtl"
,
"actionType"
:
"insertInfo"
,
"identifyCode"
:
"book-manage"
,
"messageBody"
:
datajson
,
"headData"
:
null
//
},
"requestId"
:
datajson
.
requestId
}
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
j
.
status
==
1
)
{
return
system
.
getResult
(
"获取数据成功!"
);
}
else
{
return
system
.
getResultError
(
"获取数据失败!"
);
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
j
.
status
==
1
)
{
return
system
.
getResult
(
"获取数据成功!"
);
}
else
{
return
system
.
getResultError
(
"获取数据失败!"
);
}
}
catch
(
error
)
{
return
system
.
getResultError
(
error
)
...
...
@@ -640,6 +652,27 @@ class TxHandler {
module
.
exports
=
new
TxHandler
();
// var task = new TxHandler();
// var obj = {
// "requestId": "825da0a74432-738f-4bed-b48d-d51aa808",
// "bizId": "5892748825",
// "contactsPhone": "18510669321",
// "userId": "10973452443103825",
// "orderId": "341184456620496_book",
// "areatype": "city",
// "area": "100010",
// "topOrgCode": "rong_yi_suan",
// "taxpayerType": 1,
// "product_code": "bookkeeping",
// "product_name": "代账服务",
// "service_address": "110100",
// "delivery_status": "waituserconfirm",
// "facilitator_id": "10"
// }
// task.ServiceCreate(obj, {}, {}).then(d => {
// console.log(JSON.stringify(d));
// })
// (async () => {
// var task = new TxHandler();
// var obj = {
...
...
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