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
31eaad88
Commit
31eaad88
authored
Oct 19, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/center-channel' into center-channel
parents
89248483
51d2db86
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
236 additions
and
11 deletions
+236
-11
center-channel/app/base/api/impl/action/qcapi.js
+22
-0
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+213
-11
center-channel/app/config/routes/api.js
+1
-0
No files found.
center-channel/app/base/api/impl/action/qcapi.js
View file @
31eaad88
...
...
@@ -52,6 +52,9 @@ class QcAPI extends APIBase {
case
"closeOrderDelivery"
:
//交付商关闭交付单
opResult
=
await
this
.
centerorderSve
.
closeOrderDelivery
(
pobj
);
break
;
// --------- 文网文 ---------
case
"serviceSubmitOption"
:
//服务商提交服务操作(文网文)2020-9-26
opResult
=
await
this
.
centerorderSve
.
serviceSubmitOption
(
pobj
);
break
;
...
...
@@ -67,6 +70,25 @@ class QcAPI extends APIBase {
case
"recordLogList"
:
//查询沟通记录(文网文)2020-9-29
opResult
=
await
this
.
centerorderSve
.
recordLogList
(
pobj
);
break
;
// --------- 食品 ---------
case
"foodServiceSubmitOption"
:
//服务商提交服务操作(文网文)2020-9-26
opResult
=
await
this
.
centerorderSve
.
foodServiceSubmitOption
(
pobj
);
break
;
case
"submitFoodSolution"
:
//提交方案(文网文)2020-9-26
opResult
=
await
this
.
centerorderSve
.
submitFoodSolution
(
pobj
);
break
;
case
"foodCloseNeed"
:
//关闭需求(文网文)2020-9-28
opResult
=
await
this
.
centerorderSve
.
foodCloseNeed
(
pobj
);
break
;
case
"foodRecordLog"
:
//提交沟通记录(文网文)2020-9-28
opResult
=
await
this
.
centerorderSve
.
foodRecordLog
(
pobj
);
break
;
case
"foodRecordLogList"
:
//查询沟通记录(文网文)2020-9-29
opResult
=
await
this
.
centerorderSve
.
foodRecordLogList
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
31eaad88
...
...
@@ -232,6 +232,8 @@ class QcCenterOrderService extends AppServiceBase {
return
res
;
}
// ----------- 文网文 -----------
//服务商提交服务操作(文网文)2020-9-26
async
serviceSubmitOption
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
...
...
@@ -239,10 +241,13 @@ class QcCenterOrderService extends AppServiceBase {
//推送数据至阿里
var
resStatus
=
res
.
data
.
ApplicationStatus
;
var
pushObj
=
{
BizId
:
pobj
.
actionBody
.
channelNeedNo
,
BizType
:
pobj
.
actionBody
.
channelTpye
,
OperateType
:
wangwenStatusDisct
[
resStatus
]
// BizId: pobj.actionBody.orderNo,
BizId
:
"P20201016181726000001"
,
BizType
:
pobj
.
actionBody
.
channelType
,
OperateType
:
wangwenStatusDisct
[
resStatus
],
ExtInfo
:
pobj
.
actionBody
.
extInfo
};
console
.
log
(
"fuwu++++pushObj"
,
pushObj
);
//推送状态变更
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"OperateProduceForPartner"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'ttttssss'
,
r
)
...
...
@@ -253,24 +258,51 @@ class QcCenterOrderService extends AppServiceBase {
//提交方案(文网文)2020-9-27
async
submitWangwenSolution
(
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
);
var
solution
=
res
.
data
.
needsolution
.
solutionContent
;
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
solution
=
JSON
.
parse
(
solution
);
solution
=
solution
.
solution
solution
=
JSON
.
stringify
(
solution
)
//推送数据至阿里
var
pushObj
=
{
intentionBizId
:
res
.
data
.
needinfo
.
channelNeedNo
,
bizType
:
res
.
data
.
needinfo
.
channelTypeCode
,
solution
:
res
.
data
.
needsolution
.
solutionContent
// solution: res.data.needsolution.solutionContent
solution
:
solution
};
//推送状态变更
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitSolution"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
})
;
console
.
log
(
'rrrrrrrrr'
,
r
)
console
.
log
(
"wangwen"
,
pushObj
);
var
self
=
this
;
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
return
system
.
getResultSuccess
();
}
return
res
;
}
//推送方案
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
)
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
var
resData
=
pushRes
.
data
;
var
reqObj2
=
{
actionType
:
"receiveProgrammeNo"
,
appInfo
:
appInfo
,
actionBody
:
{
solutionNo
:
solutionNo
,
solutionBizId
:
resData
.
SolutionBizId
}
};
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
return
a
;
}
}
//关闭需求
async
closeNeed
(
pobj
)
{
...
...
@@ -325,6 +357,7 @@ class QcCenterOrderService extends AppServiceBase {
});
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
},
apiVersion
:
"2020-03-06"
});
console
.
log
(
'alalallala'
,
a
)
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
return
system
.
getResultSuccess
();
}
else
{
...
...
@@ -334,6 +367,7 @@ class QcCenterOrderService extends AppServiceBase {
//提交沟通记录
async
recordLog
(
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"
);
...
...
@@ -342,8 +376,9 @@ class QcCenterOrderService extends AppServiceBase {
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100492"
);
}
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/
need
/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/
qcapi
/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'www+提交沟通记录result'
,
result
)
//推送交付系统
var
reqParams
=
{
actionBody
:
{
...
...
@@ -356,11 +391,13 @@ class QcCenterOrderService extends AppServiceBase {
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
//推送数据至阿里
var
pushObj
=
{
i
ntentionBizId
:
pobj
.
actionBody
.
needNo
,
I
ntentionBizId
:
pobj
.
actionBody
.
needNo
,
note
:
pobj
.
actionBody
.
note
};
//提交沟通记录
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIntentionNote"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIntentionNote"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'www+提交沟通记录r'
,
r
)
return
system
.
getResultSuccess
();
}
...
...
@@ -378,10 +415,174 @@ class QcCenterOrderService extends AppServiceBase {
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2020-03-06"
});
console
.
log
(
'loglist-----'
,
res
)
return
system
.
getResultSuccess
(
res
);
}
// ----------- 食品 -----------
//服务商提交服务操作
async
foodServiceSubmitOption
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
//推送数据至阿里
var
resStatus
=
res
.
data
.
ApplicationStatus
;
var
pushObj
=
{
BizId
:
pobj
.
actionBody
.
orderNo
,
BizType
:
pobj
.
actionBody
.
channelTpye
,
OperateType
:
wangwenStatusDisct
[
resStatus
],
ExtInfo
:
pobj
.
actionBody
.
extInfo
};
//推送状态变更
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"OperateProduceForPartner"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'ttttssss'
,
r
)
return
system
.
getResultSuccess
();
}
return
res
;
}
//提交方案
async
submitFoodSolution
(
pobj
)
{
console
.
log
(
'food+++pobj'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
console
.
log
(
'food+++res'
,
res
)
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
console
.
log
(
'food'
,
res
.
data
.
needsolution
.
solutionContent
);
var
solution
=
res
.
data
.
needsolution
.
solutionContent
;
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
solution
=
JSON
.
parse
(
solution
);
solution
=
solution
.
solution
solution
=
JSON
.
stringify
(
solution
)
//推送数据至阿里
var
pushObj
=
{
intentionBizId
:
res
.
data
.
needinfo
.
channelNeedNo
,
bizType
:
res
.
data
.
needinfo
.
channelTypeCode
,
// solution: res.data.needsolution.solutionContent
solution
:
solution
};
console
.
log
(
"food"
,
pushObj
);
var
self
=
this
;
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
return
system
.
getResultSuccess
();
}
return
res
;
}
//关闭需求
async
foodCloseNeed
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100395"
);
}
if
(
!
pobj
.
actionBody
.
note
)
{
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100395"
);
}
var
self
=
this
;
pobj
.
actionBody
.
intentionBizId
=
pobj
.
actionBody
.
needNo
;
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsNeedSve.js/closeNeed"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
JSON
.
stringify
(
result
),
optitle
:
"abolishIcpProgrammeByNeed推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
if
(
result
.
status
==
0
)
{
if
(
result
.
data
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
;
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
}
//推送交付系统
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
status
:
"closeNeed"
},
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
//日志记录
self
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsNeedSve.js/closeNeed"
,
content
:
JSON
.
stringify
(
reqParams
),
resultInfo
:
""
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
},
apiVersion
:
"2020-03-06"
});
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResult
(
null
,
"close fail 100389 "
);
}
}
//提交沟通记录
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"
);
}
if
(
!
pobj
.
actionBody
.
note
)
{
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100492"
);
}
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'提交沟通记录result'
,
result
)
//推送交付系统
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
status
:
"followingUp"
},
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
//推送数据至阿里
var
pushObj
=
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
note
:
pobj
.
actionBody
.
note
};
//提交沟通记录
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIntentionNote"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'提交沟通记录r'
,
r
)
return
system
.
getResultSuccess
();
}
//查看沟通记录
async
foodRecordLogList
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100493"
);
}
let
res
=
await
this
.
aliclient
.
reqbyget
({
action
:
"ListIntentionNote"
,
reqbody
:
{
BeginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
EndTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
PageNum
:
pobj
.
actionBody
.
pageNum
||
1
,
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2020-03-06"
});
return
system
.
getResultSuccess
(
res
);
}
}
module
.
exports
=
QcCenterOrderService
;
\ No newline at end of file
center-channel/app/config/routes/api.js
View file @
31eaad88
...
...
@@ -281,6 +281,7 @@ module.exports = function (app) {
"tmAccept"
,
"tmStatus"
,
"needBatchUpload"
,
"serviceSubmitOption"
,
"submitWangwenSolution"
,
"closeNeed"
,
"recordLog"
,
"recordLogList"
,
"foodServiceSubmitOption"
,
"submitFoodSolution"
,
"foodCloseNeed"
,
"foodRecordLog"
,
"foodRecordLogList"
,
"getParamsFor360"
,
"addOrderWeb"
,
];
...
...
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