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
045a1ff9
Commit
045a1ff9
authored
Mar 11, 2022
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加日志
parent
8df5446b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
31 deletions
+33
-31
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+33
-31
No files found.
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
View file @
045a1ff9
...
@@ -62,6 +62,7 @@ const baiduIcpStatus = {
...
@@ -62,6 +62,7 @@ const baiduIcpStatus = {
class
BaseCenterOrderService
extends
AppServiceBase
{
class
BaseCenterOrderService
extends
AppServiceBase
{
constructor
()
{
constructor
()
{
super
();
super
();
this
.
execClientNew
=
system
.
getObject
(
"util.execClientNew"
);
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
this
.
aliclient
=
system
.
getObject
(
"util.aliyunClient"
);
...
@@ -73,7 +74,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -73,7 +74,7 @@ class BaseCenterOrderService extends AppServiceBase {
this
.
baiduclient
=
system
.
getObject
(
"util.baiduClient"
);
this
.
baiduclient
=
system
.
getObject
(
"util.baiduClient"
);
this
.
utils360Sve
=
system
.
getObject
(
"service.utilsSve.utils360Sve"
)
this
.
utils360Sve
=
system
.
getObject
(
"service.utilsSve.utils360Sve"
)
};
};
//调用center-order
//调用center-order
async
reqCenterOrderApi
(
pobj
,
reqUrl
)
{
async
reqCenterOrderApi
(
pobj
,
reqUrl
)
{
var
url
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
url
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
if
(
reqUrl
)
{
if
(
reqUrl
)
{
...
@@ -124,10 +125,10 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -124,10 +125,10 @@ class BaseCenterOrderService extends AppServiceBase {
// var bizType = needinfo.channelTypeCode;//业务类型里
// var bizType = needinfo.channelTypeCode;//业务类型里
var
pushObj
=
{
var
pushObj
=
{
IntentionBizId
:
needinfo
.
channelNeedNo
,
IntentionBizId
:
needinfo
.
channelNeedNo
,
CompanyName
:
solution
.
CompanyName
,
CompanyName
:
solution
.
CompanyName
,
IcpType
:
solution
.
IcpType
,
IcpType
:
solution
.
IcpType
,
CompanyAddress
:
solution
.
CompanyAddress
,
CompanyAddress
:
solution
.
CompanyAddress
,
Area
:
solution
.
Area
,
Area
:
solution
.
Area
,
Note
:
solution
.
Note
,
Note
:
solution
.
Note
,
ActionType
:
solution
.
ActionType
,
ActionType
:
solution
.
ActionType
,
Source
:
"官网"
Source
:
"官网"
...
@@ -137,7 +138,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -137,7 +138,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
}
var
pushIcpSolutionRes
=
await
this
.
pushIcpSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
var
pushIcpSolutionRes
=
await
this
.
pushIcpSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
}
}
if
(
needinfo
.
uapp_id
==
uappId
.
baidu
){
if
(
needinfo
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
//推送数据至baidu
// var bizType = needinfo.channelTypeCode;//业务类型里
// var bizType = needinfo.channelTypeCode;//业务类型里
...
@@ -147,7 +148,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -147,7 +148,7 @@ class BaseCenterOrderService extends AppServiceBase {
requirementId
:
needinfo
.
channelNeedNo
,
requirementId
:
needinfo
.
channelNeedNo
,
companyName
:
solution
.
CompanyName
,
companyName
:
solution
.
CompanyName
,
companyAddress
:
solution
.
CompanyAddress
,
companyAddress
:
solution
.
CompanyAddress
,
area
:
solution
.
Area
,
area
:
solution
.
Area
,
type
:
solution
.
IcpType
type
:
solution
.
IcpType
};
};
if
(
needsolution
.
channelSolutionNo
)
{
if
(
needsolution
.
channelSolutionNo
)
{
...
@@ -166,7 +167,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -166,7 +167,7 @@ class BaseCenterOrderService extends AppServiceBase {
IntentionBizId
:
needinfo
.
channelNeedNo
,
IntentionBizId
:
needinfo
.
channelNeedNo
,
CompanyName
:
solution
.
CompanyName
,
CompanyName
:
solution
.
CompanyName
,
CompanyAddress
:
solution
.
CompanyAddress
,
CompanyAddress
:
solution
.
CompanyAddress
,
Area
:
solution
.
Area
,
Area
:
solution
.
Area
,
IcpType
:
solution
.
IcpType
IcpType
:
solution
.
IcpType
};
};
if
(
needsolution
.
channelSolutionNo
)
{
if
(
needsolution
.
channelSolutionNo
)
{
...
@@ -185,7 +186,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -185,7 +186,7 @@ class BaseCenterOrderService extends AppServiceBase {
optitle
:
"createSolution推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
optitle
:
"createSolution推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
});
}
}
var
reqParams
=
{
var
reqParams
=
{
actionBody
:
{
actionBody
:
{
intentionBizId
:
needinfo
.
channelNeedNo
,
intentionBizId
:
needinfo
.
channelNeedNo
,
...
@@ -212,10 +213,10 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -212,10 +213,10 @@ class BaseCenterOrderService extends AppServiceBase {
//推送数据至阿里
//推送数据至阿里
var
pushObj
=
{
var
pushObj
=
{
IntentionBizId
:
actionBody
.
channelNeedNo
,
IntentionBizId
:
actionBody
.
channelNeedNo
,
CompanyName
:
actionBody
.
CompanyName
,
CompanyName
:
actionBody
.
CompanyName
,
IcpType
:
actionBody
.
IcpType
,
IcpType
:
actionBody
.
IcpType
,
CompanyAddress
:
actionBody
.
CompanyAddress
,
CompanyAddress
:
actionBody
.
CompanyAddress
,
Area
:
actionBody
.
Area
,
Area
:
actionBody
.
Area
,
Note
:
actionBody
.
Note
,
Note
:
actionBody
.
Note
,
ActionType
:
actionBody
.
ActionType
,
ActionType
:
actionBody
.
ActionType
,
Source
:
"官网"
Source
:
"官网"
...
@@ -232,7 +233,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -232,7 +233,7 @@ class BaseCenterOrderService extends AppServiceBase {
requirementId
:
actionBody
.
channelNeedNo
,
requirementId
:
actionBody
.
channelNeedNo
,
companyName
:
actionBody
.
CompanyName
,
companyName
:
actionBody
.
CompanyName
,
companyAddress
:
actionBody
.
CompanyAddress
,
companyAddress
:
actionBody
.
CompanyAddress
,
area
:
actionBody
.
Area
,
area
:
actionBody
.
Area
,
type
:
actionBody
.
IcpType
type
:
actionBody
.
IcpType
};
};
if
(
actionBody
.
channelSolutionNo
)
{
if
(
actionBody
.
channelSolutionNo
)
{
...
@@ -307,7 +308,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -307,7 +308,7 @@ class BaseCenterOrderService extends AppServiceBase {
return
system
.
getResult
(
null
,
"execPost data is empty"
);
return
system
.
getResult
(
null
,
"execPost data is empty"
);
}
}
var
pushRes
=
JSON
.
parse
(
rtn
.
stdout
);
var
pushRes
=
JSON
.
parse
(
rtn
.
stdout
);
// var pushRes = await self.baiduclient.baiduReqbyget({ path: "/api/bla/provider/plan", reqbody: pushObj });
// var pushRes = await self.baiduclient.baiduReqbyget({ path: "/api/bla/provider/plan", reqbody: pushObj });
console
.
log
(
"pushRes++++"
,
pushRes
)
console
.
log
(
"pushRes++++"
,
pushRes
)
if
(
pushRes
&&
pushRes
.
ErrorCode
==
"200"
&&
pushRes
.
Success
==
true
&&
pushRes
.
BizId
)
{
if
(
pushRes
&&
pushRes
.
ErrorCode
==
"200"
&&
pushRes
.
Success
==
true
&&
pushRes
.
BizId
)
{
...
@@ -382,7 +383,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -382,7 +383,7 @@ class BaseCenterOrderService extends AppServiceBase {
};
};
if
(
actionBody
){
if
(
actionBody
){
if
(
actionBody
.
uapp_id
==
uappId
.
ali
){
if
(
actionBody
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
//推送数据至阿里
var
pushObj
=
{
var
pushObj
=
{
"BizId"
:
actionBody
.
BizId
,
"BizId"
:
actionBody
.
BizId
,
"Domain"
:
actionBody
.
Domain
,
"Domain"
:
actionBody
.
Domain
,
...
@@ -411,7 +412,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -411,7 +412,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
}
if
(
actionBody
.
uapp_id
==
uappId
.
baidu
){
if
(
actionBody
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
//推送数据至百度
var
pushObj
=
{
var
pushObj
=
{
"businessLicense"
:
{
"businessLicense"
:
{
"address"
:
actionBody
.
businessLicense
.
address
||
""
,
"address"
:
actionBody
.
businessLicense
.
address
||
""
,
...
@@ -482,9 +483,9 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -482,9 +483,9 @@ class BaseCenterOrderService extends AppServiceBase {
var
reqPushParams
=
{};
var
reqPushParams
=
{};
if
(
ab
.
isTest
&&
ab
.
isTest
==
1
){
if
(
ab
.
isTest
&&
ab
.
isTest
==
1
){
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
//推送数据至阿里
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
reqPushParams
=
{
reqPushParams
=
{
actionBody
:
{
actionBody
:
{
"uapp_id"
:
res
.
data
.
uapp_id
,
"uapp_id"
:
res
.
data
.
uapp_id
,
...
@@ -506,9 +507,9 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -506,9 +507,9 @@ class BaseCenterOrderService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
appInfo
:
pobj
.
appInfo
};
};
}
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
//推送数据至百度
var
BizId
=
needsolution
.
orderChannelNo
;
var
BizId
=
needsolution
.
orderChannelNo
;
console
.
log
(
'BizId++'
,
BizId
)
console
.
log
(
'BizId++'
,
BizId
)
reqPushParams
=
{
reqPushParams
=
{
...
@@ -548,7 +549,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -548,7 +549,7 @@ class BaseCenterOrderService extends AppServiceBase {
// console.log('result+++-reqPushParams--++++----',reqPushParams)
// console.log('result+++-reqPushParams--++++----',reqPushParams)
}
else
{
}
else
{
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
//推送数据至阿里
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
var
pushObj
=
{
var
pushObj
=
{
"CompanyName"
:
material
.
CompanyName
,
"CompanyName"
:
material
.
CompanyName
,
...
@@ -579,7 +580,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -579,7 +580,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
//推送数据至百度
var
BizId
=
needsolution
.
orderChannelNo
;
var
BizId
=
needsolution
.
orderChannelNo
;
console
.
log
(
'BizId++'
,
BizId
)
console
.
log
(
'BizId++'
,
BizId
)
var
pushObj
=
{
var
pushObj
=
{
...
@@ -664,12 +665,12 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -664,12 +665,12 @@ class BaseCenterOrderService extends AppServiceBase {
}
else
{
}
else
{
var
pushRes
=
JSON
.
parse
(
rtn
.
stdout
);
var
pushRes
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
pushRes
&&
pushRes
.
Success
&&
pushRes
.
Success
==
true
){
if
(
pushRes
&&
pushRes
.
Success
&&
pushRes
.
Success
==
true
){
aliFlag
==
200
;
aliFlag
==
200
;
}
else
{
}
else
{
aliFlag
==
-
200
;
aliFlag
==
-
200
;
}
}
}
}
}
}
if
(
aliFlag
==
200
||
baiduFlag
==
200
){
if
(
aliFlag
==
200
||
baiduFlag
==
200
){
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
...
@@ -680,7 +681,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -680,7 +681,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
}
return
res
return
res
}
}
//队列通知交付状态变更
//队列通知交付状态变更
async
serviceProvider2Notification
(
pobj
){
async
serviceProvider2Notification
(
pobj
){
...
@@ -741,10 +742,11 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -741,10 +742,11 @@ class BaseCenterOrderService extends AppServiceBase {
return
pushRes
;
return
pushRes
;
}
}
//通知交付状态变更
//通知交付状态变更
-所有渠道状态更改
async
serviceProviderNotification
(
pobj
)
{
async
serviceProviderNotification
(
pobj
)
{
console
.
log
(
'zhuangtai ++++'
,
pobj
)
console
.
log
(
'zhuangtai ++++'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
let
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
this
.
execClientNew
.
execLogs
(
"serviceProviderNotification-reqCenterOrderApi:"
,
pobj
,
"center-channel-serviceProviderNotification"
,
res
,
null
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
pobj
.
actionBody
.
isTest
&&
pobj
.
actionBody
.
isTest
==
1
){
if
(
pobj
.
actionBody
.
isTest
&&
pobj
.
actionBody
.
isTest
==
1
){
var
reqPushParams
=
{};
var
reqPushParams
=
{};
...
@@ -812,9 +814,9 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -812,9 +814,9 @@ class BaseCenterOrderService extends AppServiceBase {
}
else
{
}
else
{
var
pushRes
=
JSON
.
parse
(
rtn
.
stdout
);
var
pushRes
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
pushRes
&&
pushRes
.
Success
&&
pushRes
.
Success
==
true
){
if
(
pushRes
&&
pushRes
.
Success
&&
pushRes
.
Success
==
true
){
enameFlag
==
200
;
enameFlag
==
200
;
}
else
{
}
else
{
enameFlag
==
-
200
;
enameFlag
==
-
200
;
}
}
}
}
}
}
...
@@ -829,7 +831,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -829,7 +831,7 @@ class BaseCenterOrderService extends AppServiceBase {
};
};
//推送状态变更
//推送状态变更
var
baidu
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
var
baidu
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
console
.
log
(
'res.data baidu +++++'
,
baidu
)
this
.
execClientNew
.
execLogs
(
"serviceProviderNotification-baiduReqbyget:"
,
pushObj
,
"center-channel-serviceProviderNotification"
,
baidu
,
null
);
if
(
baidu
&&
baidu
.
data
&&
baidu
.
data
.
result
){
if
(
baidu
&&
baidu
.
data
&&
baidu
.
data
.
result
){
var
baiduFlag
=
200
var
baiduFlag
=
200
}
else
{
}
else
{
...
@@ -863,7 +865,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -863,7 +865,7 @@ class BaseCenterOrderService extends AppServiceBase {
console
.
log
(
"eNameCloseOrder+++"
,
pobj
)
console
.
log
(
"eNameCloseOrder+++"
,
pobj
)
var
pushObj
=
{}
var
pushObj
=
{}
var
orderNo
var
orderNo
var
note
var
note
orderNo
=
pobj
.
actionBody
.
orderNo
orderNo
=
pobj
.
actionBody
.
orderNo
note
=
pobj
.
actionBody
.
note
note
=
pobj
.
actionBody
.
note
pobj
.
actionType
=
"delENameOrder"
pobj
.
actionType
=
"delENameOrder"
...
...
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