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
1f02cae9
Commit
1f02cae9
authored
Nov 05, 2021
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 补充城市
parent
d4da4500
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
139 deletions
+66
-139
center-channel/app/base/api/impl/opreceive/ic.js
+3
-0
center-channel/app/base/service/impl/common/centerorderSve.js
+62
-139
center-channel/app/base/service/impl/utilsSve/utilsDeliverSystemSve.js
+1
-0
No files found.
center-channel/app/base/api/impl/opreceive/ic.js
View file @
1f02cae9
...
@@ -39,6 +39,9 @@ class Ic extends APIBase {
...
@@ -39,6 +39,9 @@ class Ic extends APIBase {
case
"orderClose"
:
//阿里退款
case
"orderClose"
:
//阿里退款
opResult
=
await
this
.
utilsOrderSve
.
orderClose
(
pobj
);
opResult
=
await
this
.
utilsOrderSve
.
orderClose
(
pobj
);
break
;
break
;
case
"pushOrderToDelivery"
:
opResult
=
await
this
.
centerorderSve
.
icOrderToDelievery
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
1f02cae9
...
@@ -731,6 +731,68 @@ class CenterorderService extends AppServiceBase {
...
@@ -731,6 +731,68 @@ class CenterorderService extends AppServiceBase {
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
async
icOrderToDelievery
(
pobj
)
{
let
orderNo
=
pobj
.
actionBody
.
orderNo
;
pobj
.
actionBody
.
orderNo
=
orderNo
;
pobj
.
actionType
=
"getSolutionByChannelOrderNo"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/need/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
if
(
!
solutionrtn
||
!
solutionrtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
var
solutiondata
=
JSON
.
parse
(
solutionrtn
.
stdout
);
if
(
solutiondata
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
if
(
!
solutiondata
.
data
)
{
return
system
.
getResultFail
(
-
5012
,
"方案查询数据为空"
);
}
var
deliveryObj
=
{
actionBody
:
{
orderNo
:
solutiondata
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
needsolution
:
solutiondata
.
data
.
solutionContent
,
channelNeedNo
:
solutiondata
.
data
.
channelNeedNo
,
channelSolutionNo
:
solutiondata
.
data
.
channelSolutionNo
,
skuCode
:
pobj
.
actionBody
.
payCode
,
servicer
:
{
code
:
'gsb'
,
name
:
'公司宝'
}
},
appInfo
:
pobj
.
appInfo
};
let
finalRet
=
null
;
if
(
pobj
.
actionBody
.
isDirectBuy
&&
pobj
.
actionBody
.
isDirectBuy
==
1
){
//直接下单需执行添加订单业务员操作
if
(
baiduPushRes
&&
baiduPushRes
.
status
==
0
){
if
(
baiduPushRes
.
data
&&
baiduPushRes
.
data
.
data
){
var
resData
=
baiduPushRes
.
data
.
data
;
var
salesmanInfo
=
{
salesmanName
:
resData
.
orderList
&&
resData
.
orderList
.
length
>
0
?
resData
.
orderList
[
0
].
operatorName
:
""
,
salesmanChannelId
:
resData
.
orderList
&&
resData
.
orderList
.
length
>
0
?
resData
.
orderList
[
0
].
operator
:
""
,
};
var
salesmanObj
=
{
appInfo
:
pobj
.
appInfo
,
actionType
:
"addIcpSalesmanInfo"
,
//添加业务员信息
actionBody
:{
salesmanInfo
:
salesmanInfo
,
orderNo
:
orderrtn
.
data
.
orderNo
}
};
var
url
=
settings
.
centerOrderUrl
()
+
"action/qcapi/springBoard"
;
var
addRes
=
await
this
.
execClient
.
execPost
(
salesmanObj
,
url
);
if
(
addRes
&&
addRes
.
stdout
)
{
var
salesmanRes
=
JSON
.
parse
(
addRes
.
stdout
);
if
(
salesmanRes
.
status
==
0
)
{
deliveryObj
.
actionBody
.
needsolution
=
salesmanRes
.
data
;
await
this
.
utilsPushSve
.
business2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
}
}
}
}
else
{
finalRet
=
await
this
.
utilsPushSve
.
business2Channel
(
deliveryObj
,
"pushDeliveryOrder"
);
}
return
finalRet
;
}
//获取易名的icp产品信息
//获取易名的icp产品信息
async
getymicpProduce
(
pobj
)
{
async
getymicpProduce
(
pobj
)
{
...
@@ -740,145 +802,6 @@ class CenterorderService extends AppServiceBase {
...
@@ -740,145 +802,6 @@ class CenterorderService extends AppServiceBase {
return
await
this
.
restPostUrl
(
pobj
,
url
);
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
}
async
tmPaySuccess
(
pobj
)
{
// var sobj = {
// actionType: "getProduceByChannelItemCode",
// actionBody: { typeCode: pobj.actionBody.channelTypeCode},
// appInfo: pobj.appInfo,
// actionProcess: pobj.actionProcess
// }
// var url = settings.centerAppUrl() + "action/opProduct/springBoard";
// var rtn = await this.execClient.execPost(sobj, url);
// if (!rtn || !rtn.stdout) {
// return system.getResultFail(-5010, "产品查询失败");
// }
// var data = JSON.parse(rtn.stdout);
// if (data.status != 0) {
// return system.getResultFail(-5010, "产品查询失败");
// }
// pobj.actionBody.orderNo = pobj.actionBody.bizId;
// pobj.actionBody.totalSum = data.data.price;
// pobj.actionBody.orderPrice = data.data.price;
// pobj.actionBody.payTotalSum = data.data.price;
// pobj.actionBody.payCode = data.data.payCode;
// pobj.actionBody.channelItemCode = data.data.channelItemCode;
// pobj.actionBody.channelNeedNo = data.data.channelNeedNo;
// pobj.actionBody.needNo = data.data.needNo;
// pobj.actionBody.quantity = 1;
// pobj.actionBody.channelOrder = {
// channelServiceNo: pobj.actionBody.orderNo,
// channelOrderNo: pobj.actionBody.orderNo,
// orderStatus: 2
// }
// var orderrtn = await this.utilsOrderSve.addOrder(pobj, pobj.actionBody);
// if (orderrtn.status != 0 && orderrtn.status != -1) {
// return system.getResultFail(-5012, "订单创建失败");
// }
// if (orderrtn.data) {
// pobj.actionBody.orderNo = orderrtn.data.orderNo;
// }
// pobj.actionBody.channelSolutionNo = pobj.actionBody.bizId;
// pobj.actionType = "receiveSolutionPayInfoNew";
// var url = settings.centerOrderUrl() + "action/icapi/springBoard";
// var solutionrtn = await this.execClient.execPost(pobj, url);
// if (!solutionrtn || !solutionrtn.stdout) {
// return system.getResultFail(-5011, "方案查询失败");
// }
// var solutiondata = JSON.parse(solutionrtn.stdout);
// if (solutiondata.status != 0) {
// return system.getResultFail(-5011, "方案查询失败");
// }
// if (!solutiondata.data) {
// return system.getResultFail(-5012, "方案查询数据为空");
// }
// if (solutiondata.data && solutiondata.data.channelNeedNo) {
// pobj.actionBody.needId = solutiondata.data.channelNeedNo;
// }
// if (pobj.actionBody.channelItemCode == '5') {
// pobj.actionBody.regType = "baidu.icp";
// } else if (pobj.actionBody.channelItemCode == '7') {
// pobj.actionBody.regType = "baidu.edi";
// }
// else if (pobj.actionBody.channelItemCode == 'NC') {
// pobj.actionBody.regType = "baidu.wangwen";
// }
// else if (pobj.actionBody.channelItemCode == 'RT') {
// pobj.actionBody.regType = "baidu.radiotv";
// }
// if(pobj && pobj.appInfo && pobj.appInfo.uapp_id && pobj.appInfo.uapp_id=='52'){
// if (pobj.actionBody.channelItemCode == '5') {
// pobj.actionBody.regType = "yiming.icp";
// } else if (pobj.actionBody.channelItemCode == '7') {
// pobj.actionBody.regType = "yiming.edi";
// }
// else if (pobj.actionBody.channelItemCode == 'icpnb') {
// pobj.actionBody.regType = "yiming.icpnb";
// }else if (pobj.actionBody.channelItemCode == 'edinb') {
// pobj.actionBody.regType = "yiming.edinb";
// }
// }
// var fqobj = {
// actionBody: {
// area: pobj.actionBody.province,
// idempotentSource: pobj.actionBody.regType,
// orderNo: pobj.actionBody.channelOrder.channelOrderNo,
// orderPrice: Number(pobj.actionBody.orderPrice / 100),
// phone: pobj.actionBody.publishMobile,
// needId: solutiondata.data.channelNeedNo,
// companyName:solutiondata.data.solutionContent.solution.CompanyName || '',
// //2021-1-21 laolan add new
// appName:pobj.appInfo.app_name || '',
// sku:data.data.service_code || ''
// },
// appInfo: pobj.appInfo
// }
// var baiduPushRes = await this.utilsPushSve.baiduBusiness2Fq(fqobj, "pushOrderICPBusinessNew");
// var deliveryObj = {
// actionBody: {
// orderNo: orderrtn.data.orderNo,//pobj.actionBody.channelOrder.channelOrderNo,
// needsolution: solutiondata.data.solutionContent,
// channelNeedNo: solutiondata.data.channelNeedNo,
// channelSolutionNo: solutiondata.data.channelSolutionNo,
// skuCode: data.data.payCode,
// servicer: {
// code: 'gsb',
// name: '公司宝'
// }
// },
// appInfo: pobj.appInfo
// };
// if(pobj.actionBody.isDirectBuy && pobj.actionBody.isDirectBuy==1){//直接下单需执行添加订单业务员操作
// if(baiduPushRes && baiduPushRes.status==0){
// if(baiduPushRes.data && baiduPushRes.data.data){
// var resData = baiduPushRes.data.data;
// var salesmanInfo = {
// salesmanName:resData.orderList && resData.orderList.length>0?resData.orderList[0].operatorName:"",
// salesmanChannelId:resData.orderList && resData.orderList.length>0?resData.orderList[0].operator:"",
// };
// var salesmanObj={
// appInfo:pobj.appInfo,
// actionType:"addIcpSalesmanInfo",//添加业务员信息
// actionBody:{salesmanInfo:salesmanInfo,orderNo:orderrtn.data.orderNo}
// };
// var url = settings.centerOrderUrl() + "action/qcapi/springBoard";
// var addRes = await this.execClient.execPost(salesmanObj, url);
// if (addRes && addRes.stdout) {
// var salesmanRes = JSON.parse(addRes.stdout);
// if (salesmanRes.status == 0) {
// deliveryObj.actionBody.needsolution = salesmanRes.data;
// await this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
// }
// }
// }
// }
// }else{
// this.utilsPushSve.baiduBusiness2Delivery(deliveryObj, "pushDeliveryOrder");
// }
return
system
.
getResultSuccess
();
}
}
}
module
.
exports
=
CenterorderService
;
module
.
exports
=
CenterorderService
;
// var task = new CenterorderService();
// var task = new CenterorderService();
...
...
center-channel/app/base/service/impl/utilsSve/utilsDeliverSystemSve.js
View file @
1f02cae9
...
@@ -47,6 +47,7 @@ class UtilsDeliverSystemService extends AppServiceBase {
...
@@ -47,6 +47,7 @@ class UtilsDeliverSystemService extends AppServiceBase {
try
{
try
{
var
rtn
=
await
this
.
restPostUrl
(
reqParams
,
pushQueueUrl
);
var
rtn
=
await
this
.
restPostUrl
(
reqParams
,
pushQueueUrl
);
if
(
rtn
.
status
!=
1
)
{
if
(
rtn
.
status
!=
1
)
{
this
.
execClientNew
.
execLogs
(
`推送队列接收数据失败->opQueuePushClientPost`
,
pobj
,
"center-channel-utilsDeliverSystemSve-opQueuePushClientPost"
,
rtn
,
JSON
.
stringify
(
rtn
));
return
system
.
getResult
(
null
,
"推送队列接收数据失败,失败原因:"
+
JSON
.
stringify
(
rtn
));
return
system
.
getResult
(
null
,
"推送队列接收数据失败,失败原因:"
+
JSON
.
stringify
(
rtn
));
}
}
return
system
.
getResultSuccess
(
null
,
"推送成功"
);
return
system
.
getResultSuccess
(
null
,
"推送成功"
);
...
...
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