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
8177648b
Commit
8177648b
authored
Oct 18, 2020
by
兰国旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wangwen-test
parent
4a27a256
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
237 additions
and
12 deletions
+237
-12
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
+2
-1
No files found.
center-channel/app/base/api/impl/action/qcapi.js
View file @
8177648b
...
@@ -52,6 +52,9 @@ class QcAPI extends APIBase {
...
@@ -52,6 +52,9 @@ class QcAPI extends APIBase {
case
"closeOrderDelivery"
:
//交付商关闭交付单
case
"closeOrderDelivery"
:
//交付商关闭交付单
opResult
=
await
this
.
centerorderSve
.
closeOrderDelivery
(
pobj
);
opResult
=
await
this
.
centerorderSve
.
closeOrderDelivery
(
pobj
);
break
;
break
;
// --------- 文网文 ---------
case
"serviceSubmitOption"
:
//服务商提交服务操作(文网文)2020-9-26
case
"serviceSubmitOption"
:
//服务商提交服务操作(文网文)2020-9-26
opResult
=
await
this
.
centerorderSve
.
serviceSubmitOption
(
pobj
);
opResult
=
await
this
.
centerorderSve
.
serviceSubmitOption
(
pobj
);
break
;
break
;
...
@@ -67,6 +70,25 @@ class QcAPI extends APIBase {
...
@@ -67,6 +70,25 @@ class QcAPI extends APIBase {
case
"recordLogList"
:
//查询沟通记录(文网文)2020-9-29
case
"recordLogList"
:
//查询沟通记录(文网文)2020-9-29
opResult
=
await
this
.
centerorderSve
.
recordLogList
(
pobj
);
opResult
=
await
this
.
centerorderSve
.
recordLogList
(
pobj
);
break
;
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
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
8177648b
...
@@ -232,6 +232,8 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -232,6 +232,8 @@ class QcCenterOrderService extends AppServiceBase {
return
res
;
return
res
;
}
}
// ----------- 文网文 -----------
//服务商提交服务操作(文网文)2020-9-26
//服务商提交服务操作(文网文)2020-9-26
async
serviceSubmitOption
(
pobj
)
{
async
serviceSubmitOption
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
...
@@ -239,10 +241,13 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -239,10 +241,13 @@ class QcCenterOrderService extends AppServiceBase {
//推送数据至阿里
//推送数据至阿里
var
resStatus
=
res
.
data
.
ApplicationStatus
;
var
resStatus
=
res
.
data
.
ApplicationStatus
;
var
pushObj
=
{
var
pushObj
=
{
BizId
:
pobj
.
actionBody
.
channelNeedNo
,
// BizId: pobj.actionBody.orderNo,
BizType
:
pobj
.
actionBody
.
channelTpye
,
BizId
:
"P20201016181726000001"
,
OperateType
:
wangwenStatusDisct
[
resStatus
]
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"
});
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"OperateProduceForPartner"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'ttttssss'
,
r
)
console
.
log
(
'ttttssss'
,
r
)
...
@@ -253,24 +258,51 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -253,24 +258,51 @@ class QcCenterOrderService extends AppServiceBase {
//提交方案(文网文)2020-9-27
//提交方案(文网文)2020-9-27
async
submitWangwenSolution
(
pobj
)
{
async
submitWangwenSolution
(
pobj
)
{
console
.
log
(
'文网文提交方案'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
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
=
{
var
pushObj
=
{
intentionBizId
:
res
.
data
.
needinfo
.
channelNeedNo
,
intentionBizId
:
res
.
data
.
needinfo
.
channelNeedNo
,
bizType
:
res
.
data
.
needinfo
.
channelTypeCode
,
bizType
:
res
.
data
.
needinfo
.
channelTypeCode
,
solution
:
res
.
data
.
needsolution
.
solutionContent
// solution: res.data.needsolution.solutionContent
solution
:
solution
};
};
//推送状态变更
console
.
log
(
"wangwen"
,
pushObj
);
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitSolution"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
})
;
var
self
=
this
;
console
.
log
(
'rrrrrrrrr'
,
r
)
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
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
)
{
async
closeNeed
(
pobj
)
{
...
@@ -325,6 +357,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -325,6 +357,7 @@ class QcCenterOrderService extends AppServiceBase {
});
});
// 推送ali
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
},
apiVersion
:
"2020-03-06"
});
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"
);
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
else
{
}
else
{
...
@@ -334,6 +367,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -334,6 +367,7 @@ class QcCenterOrderService extends AppServiceBase {
//提交沟通记录
//提交沟通记录
async
recordLog
(
pobj
)
{
async
recordLog
(
pobj
)
{
console
.
log
(
'提交沟通记录pobj'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
!
pobj
.
actionBody
.
needNo
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100491"
);
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100491"
);
...
@@ -342,8 +376,9 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -342,8 +376,9 @@ class QcCenterOrderService extends AppServiceBase {
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100492"
);
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100492"
);
}
}
var
self
=
this
;
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/
need
/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/
qcapi
/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'www+提交沟通记录result'
,
result
)
//推送交付系统
//推送交付系统
var
reqParams
=
{
var
reqParams
=
{
actionBody
:
{
actionBody
:
{
...
@@ -356,11 +391,13 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -356,11 +391,13 @@ class QcCenterOrderService extends AppServiceBase {
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
//推送数据至阿里
//推送数据至阿里
var
pushObj
=
{
var
pushObj
=
{
i
ntentionBizId
:
pobj
.
actionBody
.
needNo
,
I
ntentionBizId
:
pobj
.
actionBody
.
needNo
,
note
:
pobj
.
actionBody
.
note
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
();
return
system
.
getResultSuccess
();
}
}
...
@@ -378,10 +415,174 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -378,10 +415,174 @@ class QcCenterOrderService extends AppServiceBase {
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2020-03-06"
},
apiVersion
:
"2020-03-06"
});
});
console
.
log
(
'loglist-----'
,
res
)
return
system
.
getResultSuccess
(
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
;
module
.
exports
=
QcCenterOrderService
;
\ No newline at end of file
center-channel/app/config/routes/api.js
View file @
8177648b
...
@@ -282,7 +282,8 @@ module.exports = function (app) {
...
@@ -282,7 +282,8 @@ module.exports = function (app) {
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
,
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
,
"tmAccept"
,
"tmStatus"
,
"tmAccept"
,
"tmStatus"
,
"needBatchUpload"
,
"needBatchUpload"
,
"serviceSubmitOption"
,
"submitWangwenSolution"
,
"closeNeed"
,
"recordLog"
,
"recordLogList"
"serviceSubmitOption"
,
"submitWangwenSolution"
,
"closeNeed"
,
"recordLog"
,
"recordLogList"
,
"foodServiceSubmitOption"
,
"submitFoodSolution"
,
"foodCloseNeed"
,
"foodRecordLog"
,
"foodRecordLogList"
];
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
...
...
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