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
fd6ec8b3
Commit
fd6ec8b3
authored
Nov 06, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
6341c45c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
81 deletions
+81
-81
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+81
-81
No files found.
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
fd6ec8b3
...
...
@@ -60,8 +60,8 @@ class QcCenterOrderService extends AppServiceBase {
IntentionBizId
:
needinfo
.
channelNeedNo
,
CompanyName
:
solution
.
CompanyName
,
IcpType
:
solution
.
IcpType
,
CompanyAddress
:
solution
.
CompanyAddress
,
Area
:
solution
.
Area
,
Note
:
solution
.
Note
,
ActionType
:
solution
.
actionType
,
Source
:
"官网"
ActionType
:
solution
.
actionType
,
Source
:
"官网"
};
if
(
needsolution
.
channelSolutionNo
)
{
pushObj
[
"BizId"
]
=
needsolution
.
channelSolutionNo
;
...
...
@@ -196,7 +196,7 @@ class QcCenterOrderService extends AppServiceBase {
};
var
self
=
this
;
//推送方案材料
if
(
pobj
.
appInfo
.
uapp_id
==
18
)
{
if
(
pobj
.
appInfo
.
uapp_id
==
18
)
{
self
.
aliclient
.
reqbyget
({
action
:
"SavePartnerSubmitMaterial"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
}
return
system
.
getResultSuccess
();
...
...
@@ -210,20 +210,20 @@ class QcCenterOrderService extends AppServiceBase {
pobj
.
actionType
=
"getOrderByOrderNo"
;
let
orderUrl
=
settings
.
centerOrderUrl
()
+
"action/order/springBoard"
;
let
orderResult
=
await
this
.
restPostUrl
(
pobj
,
orderUrl
);
if
(
orderResult
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
,
'查询订单失败'
)
if
(
orderResult
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
,
'查询订单失败'
)
}
let
uapp_id
=
orderResult
.
data
.
uapp_id
;
pobj
.
appInfo
=
{
uapp_id
:
uapp_id
};
pobj
.
appInfo
=
{
uapp_id
:
uapp_id
};
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
productItemInterfaceResult
.
status
!=
0
)
{
system
.
getResultFail
(
-
1
,
'获取接口参数失败'
)
if
(
productItemInterfaceResult
.
status
!=
0
)
{
system
.
getResultFail
(
-
1
,
'获取接口参数失败'
)
}
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
pobj
.
pushObj
=
res
.
data
;
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
'pushStatus'
,
1
);
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
'pushStatus'
,
1
);
//推送数据至阿里
// var pushObj = {
// BizId: res.data.BizId,
...
...
@@ -253,7 +253,7 @@ class QcCenterOrderService extends AppServiceBase {
return
res
;
}
// ----------- 文网文 -----------
// ----------- 文网文 -----------
//服务商提交服务操作(文网文)2020-9-26
async
serviceSubmitOption
(
pobj
)
{
...
...
@@ -265,12 +265,12 @@ class QcCenterOrderService extends AppServiceBase {
BizId
:
pobj
.
actionBody
.
orderNo
,
BizType
:
pobj
.
actionBody
.
channelType
,
OperateType
:
wangwenStatusDisct
[
resStatus
],
ExtInfo
:
pobj
.
actionBody
.
extInfo
ExtInfo
:
pobj
.
actionBody
.
extInfo
};
console
.
log
(
"fuwu++++pushObj"
,
pushObj
);
console
.
log
(
"fuwu++++pushObj"
,
pushObj
);
//推送状态变更
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"OperateProduceForPartner"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'ttttssss'
,
r
)
console
.
log
(
'ttttssss'
,
r
)
return
system
.
getResultSuccess
();
}
return
res
;
...
...
@@ -278,10 +278,10 @@ class QcCenterOrderService extends AppServiceBase {
//提交方案(文网文)2020-9-27
async
submitWangwenSolution
(
pobj
)
{
console
.
log
(
'文网文提交方案'
,
pobj
)
console
.
log
(
'文网文提交方案'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
console
.
log
(
'www'
,
res
.
data
.
needsolution
.
solutionContent
);
console
.
log
(
'www'
,
res
.
data
.
needsolution
.
solutionContent
);
var
solution
=
res
.
data
.
needsolution
.
solutionContent
;
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
solution
=
JSON
.
parse
(
solution
);
...
...
@@ -316,7 +316,7 @@ class QcCenterOrderService extends AppServiceBase {
// solution: res.data.needsolution.solutionContent
solution
:
solution
};
console
.
log
(
"wangwen"
,
pushObj
);
console
.
log
(
"wangwen"
,
pushObj
);
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
return
system
.
getResultSuccess
();
...
...
@@ -329,7 +329,7 @@ class QcCenterOrderService extends AppServiceBase {
async
pushSubmitSolution
(
pushObj
,
solutionNo
,
appInfo
,
self
)
{
//推送状态变更
var
pushRes
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitSolution"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'wangwen++++pushRespushRes'
,
pushRes
)
console
.
log
(
'wangwen++++pushRespushRes'
,
pushRes
)
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
var
resData
=
pushRes
.
data
;
var
reqObj2
=
{
...
...
@@ -359,7 +359,7 @@ class QcCenterOrderService extends AppServiceBase {
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'www+++result'
,
result
)
console
.
log
(
'www+++result'
,
result
)
if
(
result
.
status
==
0
)
{
if
(
result
.
data
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
;
...
...
@@ -390,8 +390,8 @@ class QcCenterOrderService extends AppServiceBase {
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2020-03-06"
});
console
.
log
(
'alalallala'
,
a
)
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2020-03-06"
});
console
.
log
(
'alalallala'
,
a
)
// 2020 1021 lin 新增查看日志
self
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
...
@@ -411,7 +411,7 @@ class QcCenterOrderService extends AppServiceBase {
//提交沟通记录
async
recordLog
(
pobj
)
{
console
.
log
(
'提交沟通记录pobj'
,
pobj
)
console
.
log
(
'提交沟通记录pobj'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100491"
);
...
...
@@ -422,7 +422,7 @@ class QcCenterOrderService extends AppServiceBase {
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'www+提交沟通记录result'
,
result
)
console
.
log
(
'www+提交沟通记录result'
,
result
)
//推送交付系统
var
reqParams
=
{
actionBody
:
{
...
...
@@ -441,7 +441,7 @@ class QcCenterOrderService extends AppServiceBase {
//提交沟通记录
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIntentionNote"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'www+提交沟通记录r'
,
r
)
console
.
log
(
'www+提交沟通记录r'
,
r
)
return
system
.
getResultSuccess
();
}
...
...
@@ -459,10 +459,10 @@ class QcCenterOrderService extends AppServiceBase {
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2020-03-06"
});
console
.
log
(
'loglist-----'
,
res
)
if
(
res
&&
res
.
data
&&
res
.
data
.
Data
)
{
console
.
log
(
'loglist-----'
,
res
)
if
(
res
&&
res
.
data
&&
res
.
data
.
Data
)
{
var
len
=
res
.
data
.
Data
.
length
;
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
res
.
data
.
Data
[
i
].
CreateTime
=
res
.
data
.
Data
[
i
].
CreateTime
/
1000
}
}
...
...
@@ -470,10 +470,10 @@ class QcCenterOrderService extends AppServiceBase {
}
// ----------- 食品 -----------
// ----------- 食品 -----------
//服务商提交服务操作
async
foodServiceSubmitOption
(
pobj
)
{
//服务商提交服务操作
async
foodServiceSubmitOption
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
//推送数据至阿里
...
...
@@ -482,23 +482,23 @@ async foodServiceSubmitOption(pobj) {
BizId
:
pobj
.
actionBody
.
orderNo
,
BizType
:
pobj
.
actionBody
.
channelTpye
,
OperateType
:
wangwenStatusDisct
[
resStatus
],
ExtInfo
:
pobj
.
actionBody
.
extInfo
ExtInfo
:
pobj
.
actionBody
.
extInfo
};
//推送状态变更
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"OperateProduceForPartner"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'ttttssss'
,
r
)
console
.
log
(
'ttttssss'
,
r
)
return
system
.
getResultSuccess
();
}
return
res
;
}
}
//提交方案
async
submitFoodSolution
(
pobj
)
{
console
.
log
(
'food+++pobj'
,
pobj
)
//提交方案
async
submitFoodSolution
(
pobj
)
{
console
.
log
(
'food+++pobj'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
console
.
log
(
'food+++res'
,
res
)
console
.
log
(
'food+++res'
,
res
)
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
console
.
log
(
'food'
,
res
.
data
.
needsolution
.
solutionContent
);
console
.
log
(
'food'
,
res
.
data
.
needsolution
.
solutionContent
);
var
solution
=
res
.
data
.
needsolution
.
solutionContent
;
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
solution
=
JSON
.
parse
(
solution
);
...
...
@@ -533,16 +533,16 @@ async submitFoodSolution(pobj) {
// solution: res.data.needsolution.solutionContent
solution
:
solution
};
console
.
log
(
"food"
,
pushObj
);
console
.
log
(
"food"
,
pushObj
);
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
return
system
.
getResultSuccess
();
}
return
res
;
}
}
//关闭需求
async
foodCloseNeed
(
pobj
)
{
//关闭需求
async
foodCloseNeed
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100395"
);
...
...
@@ -555,7 +555,7 @@ async foodCloseNeed(pobj) {
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'food+++result'
,
result
)
console
.
log
(
'food+++result'
,
result
)
if
(
result
.
status
==
0
)
{
if
(
result
.
data
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
;
...
...
@@ -587,17 +587,17 @@ async foodCloseNeed(pobj) {
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2020-03-06"
});
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2020-03-06"
});
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseFoodNeed"
);
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResult
(
null
,
"close fail 100389 "
);
}
}
}
//提交沟通记录
async
foodRecordLog
(
pobj
)
{
console
.
log
(
'提交沟通记录pobj'
,
pobj
)
//提交沟通记录
async
foodRecordLog
(
pobj
)
{
console
.
log
(
'提交沟通记录pobj'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100491"
);
...
...
@@ -608,7 +608,7 @@ async foodRecordLog(pobj) {
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'提交沟通记录result'
,
result
)
console
.
log
(
'提交沟通记录result'
,
result
)
//推送交付系统
var
reqParams
=
{
actionBody
:
{
...
...
@@ -627,12 +627,12 @@ async foodRecordLog(pobj) {
//提交沟通记录
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIntentionNote"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'提交沟通记录r'
,
r
)
console
.
log
(
'提交沟通记录r'
,
r
)
return
system
.
getResultSuccess
();
}
}
//查看沟通记录
async
foodRecordLogList
(
pobj
)
{
//查看沟通记录
async
foodRecordLogList
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100493"
);
}
...
...
@@ -645,22 +645,22 @@ async foodRecordLogList(pobj) {
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2020-03-06"
});
if
(
res
&&
res
.
data
&&
res
.
data
.
Data
)
{
if
(
res
&&
res
.
data
&&
res
.
data
.
Data
)
{
var
len
=
res
.
data
.
Data
.
length
;
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
res
.
data
.
Data
[
i
].
CreateTime
=
res
.
data
.
Data
[
i
].
CreateTime
/
1000
}
}
return
system
.
getResultSuccess
(
res
);
}
}
//推送订单状态
async
pushOrderStatus
(
pobj
){
async
pushOrderStatus
(
pobj
)
{
if
(
!
pobj
.
interface_params
)
{
return
system
.
getResult
(
null
,
"interface_params can not be empty,100400"
);
}
let
interface_params_info
=
JSON
.
parse
(
pobj
.
interface_params
);
if
(
!
interface_params_info
||
!
interface_params_info
.
action
||
interface_params_info
.
apiVersion
)
{
if
(
!
interface_params_info
||
!
interface_params_info
.
action
||
!
interface_params_info
.
apiVersion
)
{
return
system
.
getResult
(
null
,
"interface_params(action、apiVersion) can not be empty,100430"
);
}
let
pushObj
=
{
...
...
@@ -669,35 +669,35 @@ async foodRecordLogList(pobj) {
ApplicationStatus
:
pobj
.
pushObj
.
ApplicationStatus
};
let
obj
=
{
action
:
interface_params_info
.
action
,
reqbody
:
pushObj
,
apiVersion
:
interface_params_info
.
apiVersion
action
:
interface_params_info
.
action
,
reqbody
:
pushObj
,
apiVersion
:
interface_params_info
.
apiVersion
}
let
result
=
await
this
.
aliclient
.
reqbyget
(
obj
);
return
result
;
}
// //推送ICP方案
// async pushIcpSolution1(pushObj, solutionNo, appInfo, self) {
// //推送方案确认信息
// var confirmRes = await this.aliclient.reqbyget({ action: "ConfirmIntention", reqbody: { BizId: pushObj.IntentionBizId }, apiVersion: "2019-05-08" });
// console.log("confirmRes",confirmRes)
// // if (confirmRes && confirmRes.status == 0 && confirmRes.data) {
// // var confirmResData = confirmRes.data;
// // if (confirmResData.ConfirmUrl) {
// // var reqObj3 = {
// // actionType: "receiveIcpConfirmUrl",
// // appInfo: appInfo,
// // actionBody: {
// // solutionNo: solutionNo,
// // confirmUrl: confirmResData.ConfirmUrl
// // }
// // };
// // var a = await self.reqCenterOrderApi(reqObj3);//保存用户确认方案url
// // }
// // }
// // return confirmRes;
// }
// //推送ICP方案
// async pushIcpSolution1(pushObj, solutionNo, appInfo, self) {
// //推送方案确认信息
// var confirmRes = await this.aliclient.reqbyget({ action: "ConfirmIntention", reqbody: { BizId: pushObj.IntentionBizId }, apiVersion: "2019-05-08" });
// console.log("confirmRes",confirmRes)
// // if (confirmRes && confirmRes.status == 0 && confirmRes.data) {
// // var confirmResData = confirmRes.data;
// // if (confirmResData.ConfirmUrl) {
// // var reqObj3 = {
// // actionType: "receiveIcpConfirmUrl",
// // appInfo: appInfo,
// // actionBody: {
// // solutionNo: solutionNo,
// // confirmUrl: confirmResData.ConfirmUrl
// // }
// // };
// // var a = await self.reqCenterOrderApi(reqObj3);//保存用户确认方案url
// // }
// // }
// // return confirmRes;
// }
}
module
.
exports
=
QcCenterOrderService
;
...
...
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