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
832d845d
Commit
832d845d
authored
Jul 31, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
91f02175
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
47 deletions
+91
-47
center-channel/app/base/api/impl/opreceive/need.js
+2
-4
center-channel/app/base/service/impl/common/centerorderSve.js
+20
-12
center-channel/app/base/service/impl/utilsSve/utilsDeliverSystemSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+43
-27
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+24
-2
center-channel/app/config/settings.js
+1
-1
No files found.
center-channel/app/base/api/impl/opreceive/need.js
View file @
832d845d
...
...
@@ -61,11 +61,9 @@ class Need extends APIBase {
opResult
=
await
this
.
utilsNeedSve
.
reqCenterOrderQcApi
(
pobj
);
break
;
case
"icpNotify"
:
//icp方案更新
var
rtn
=
await
this
.
utilsNeedSve
.
icpNotify
(
pobj
,
pobj
.
actionBody
);
if
(
pobj
.
actionBody
.
status
==
2
&&
rtn
.
status
==
0
)
{
opResult
=
await
this
.
utilsNeedSve
.
icpNotify
(
pobj
,
pobj
.
actionBody
);
if
(
opResult
.
status
==
0
&&
pobj
.
actionBody
.
status
==
2
)
{
opResult
=
await
self
.
centerorderSve
.
icppaysuccess
(
pobj
,
pobj
.
actionBody
);
}
else
{
opResult
=
rtn
;
}
break
;
case
"writeCommunicationLog"
:
//icp接收方案反馈信息
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
832d845d
...
...
@@ -259,7 +259,6 @@ class CenterorderService extends AppServiceBase {
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
console
.
log
(
solutionrtn
);
if
(
!
solutionrtn
||
!
solutionrtn
.
stdout
)
{
return
system
.
getResultFail
(
-
5011
,
"方案查询失败"
);
}
...
...
@@ -267,6 +266,9 @@ class CenterorderService extends AppServiceBase {
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
;
}
...
...
@@ -276,20 +278,26 @@ class CenterorderService extends AppServiceBase {
pobj
.
actionBody
.
regType
=
"ali.edi"
;
}
var
fqobj
=
{
"actionType"
:
"getAppInterface"
,
"actionBody"
:
{
"area"
:
pobj
.
actionBody
.
province
,
"city"
:
pobj
.
actionBody
.
province
,
"regType"
:
pobj
.
actionBody
.
regType
,
"orderNo"
:
pobj
.
actionBody
.
channelOrder
.
channelOrderNo
,
"orderPrice"
:
pobj
.
actionBody
.
orderPrice
,
"phone"
:
pobj
.
actionBody
.
publishMobile
,
"needId"
:
solutiondata
.
data
.
channelNeedNo
actionBody
:
{
area
:
pobj
.
actionBody
.
province
,
city
:
pobj
.
actionBody
.
province
,
regType
:
pobj
.
actionBody
.
regType
,
orderNo
:
pobj
.
actionBody
.
channelOrder
.
channelOrderNo
,
orderPrice
:
pobj
.
actionBody
.
orderPrice
,
phone
:
pobj
.
actionBody
.
publishMobile
,
needId
:
solutiondata
.
data
.
channelNeedNo
},
"appInfo"
:
pobj
.
appInfo
appInfo
:
pobj
.
appInfo
}
var
deliveryObj
=
{
actionBody
:
{
orderNo
:
pobj
.
actionBody
.
channelOrder
.
channelOrderNo
,
needsolution
:
solutiondata
.
data
.
solutionContent
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
fqobj
,
"pushOrderICPBusiness"
);
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
return
system
.
getResultSuccess
();
}
//--------------------------阿里IC---end--------------------------------------------------------
...
...
center-channel/app/base/service/impl/utilsSve/utilsDeliverSystemSve.js
View file @
832d845d
...
...
@@ -39,7 +39,7 @@ class UtilsDeliverSystemService extends AppServiceBase {
async
opQueuePushClientPost
(
pobj
,
pushQueueUrl
,
reqParams
)
{
try
{
var
rtn
=
await
this
.
restPostUrl
(
pushQueueUrl
,
reqParams
);
var
rtn
=
await
this
.
restPostUrl
(
reqParams
,
pushQueueUrl
);
if
(
rtn
.
status
!=
1
)
{
return
system
.
getResult
(
null
,
"推送队列接收数据失败,失败原因:"
+
JSON
.
stringify
(
rtn
));
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
832d845d
...
...
@@ -41,16 +41,16 @@ class UtilsNeedService extends AppServiceBase {
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
}
else
{
if
(
pobj
.
actionBody
.
channel_type_code
==
5
)
{
pobj
.
actionBody
.
type
=
"ali.icp"
;
}
else
{
pobj
.
actionBody
.
type
=
"ali.edi"
;
}
else
{
if
(
pobj
.
actionBody
.
channel_type_code
==
5
)
{
pobj
.
actionBody
.
type
=
"ali.icp"
;
}
else
{
pobj
.
actionBody
.
type
=
"ali.edi"
;
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedICPBusiness"
);
}
}
}
return
result
;
}
...
...
@@ -104,7 +104,7 @@ class UtilsNeedService extends AppServiceBase {
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
result
.
status
==
0
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
}
// else{
...
...
@@ -162,14 +162,14 @@ class UtilsNeedService extends AppServiceBase {
* @param {*} pobj
* @param {*} actionBody bizId 渠道方案号
*/
async
getItemByChannelSolutionNo
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100390"
);
async
getItemByChannelSolutionNo
(
pobj
,
actionBody
)
{
if
(
!
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100390"
);
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
itemResult
;
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
itemResult
;
}
/**
* 关闭需求
* @param {*} pobj
...
...
@@ -268,13 +268,27 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
actionType
=
"receiveIcpStatusNotify"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/qcapi/springBoard"
;
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
rtn
.
status
==
0
&&
actionBody
.
status
!=
2
&&
rtn
.
data
)
{
var
tmpObj
=
{
actionBody
:
{
orderNo
:
rtn
.
data
.
orderNo
,
needsolution
:
rtn
.
data
.
solutionContent
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
tmpObj
,
"pushDeliveryStatusNotify"
);
if
(
actionBody
.
status
==
11
)
{
self
.
utilsPushSve
.
aliBusiness2Fq
(
tmpObj
,
"pushOrderICPClose"
);
}
}
//通知更新状态
return
rtn
;
}
/**
* 推送交付信息至企业宝(交付系统)
*/
async
pushOrderDelivery2Qfb
(
pobj
,
needsolution
)
{
async
pushOrderDelivery2Qfb
(
pobj
,
needsolution
)
{
}
async
opDownFileInfo
(
docUrl
,
result
)
{
//从oss下载到本地并上传到自己oss,之后删除本地文件
...
...
@@ -330,8 +344,8 @@ class UtilsNeedService extends AppServiceBase {
}
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
sobj
,
reqUrl
);
if
(
itemResult
.
status
==
0
)
{
itemResult
.
data
.
channelSolutionNo
=
pobj
.
actionBody
.
channelSolutionNo
;
if
(
itemResult
.
status
==
0
)
{
itemResult
.
data
.
channelSolutionNo
=
pobj
.
actionBody
.
channelSolutionNo
;
}
return
itemResult
;
}
...
...
@@ -346,10 +360,10 @@ class UtilsNeedService extends AppServiceBase {
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
let
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
BizId
,
Note
:
pobj
.
actionBody
.
Note
},
apiVersion
:
"2019-05-08"
});
let
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
BizId
,
Note
:
pobj
.
actionBody
.
Note
},
apiVersion
:
"2019-05-08"
});
return
result
;
}
async
queryExpertApplyCommunicationLogs
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
BizId
)
{
return
system
.
getResult
(
null
,
"actionBody.BizId can not be empty,100493"
);
...
...
@@ -357,13 +371,15 @@ class UtilsNeedService extends AppServiceBase {
if
(
!
pobj
.
actionBody
.
UserFeedBack
)
{
return
system
.
getResult
(
null
,
"actionBody.UserFeedBack can not be empty,100494"
);
}
let
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"queryExpertApplyCommunicationLogs"
,
reqbody
:
{
let
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"queryExpertApplyCommunicationLogs"
,
reqbody
:
{
BeginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
EndTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
BizId
:
pobj
.
actionBody
.
BizId
,
UserFeedBack
:
pobj
.
actionBody
.
UserFeedBack
,
apiVersion
:
"2019-05-08"
}});
EndTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
BizId
:
pobj
.
actionBody
.
BizId
,
UserFeedBack
:
pobj
.
actionBody
.
UserFeedBack
,
apiVersion
:
"2019-05-08"
}
});
return
res
;
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
832d845d
...
...
@@ -7,12 +7,34 @@ class UtilsPushService extends AppServiceBase {
super
();
};
async
aliBusiness2Delivery
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/utilsSve/utilsPushSve.js/service/app.base.js/aliBusiness2Delivery"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
productItemInterfaceResult
.
data
?
JSON
.
stringify
(
productItemInterfaceResult
.
data
)
:
"接口数据为空"
,
optitle
:
pobj
.
opType
+
"推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
if
(
pobj
.
interface_info
)
{
await
this
.
pushBusInfo
(
pobj
,
opType
,
1
);
return
system
.
getResultSuccess
();
}
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
}
async
aliBusiness2Fq
(
pobj
,
opType
)
{
//供业务调用,在代码中调用,不在db中做配置进行调用
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
debugger
;
//日志记录
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
...
@@ -30,7 +52,7 @@ class UtilsPushService extends AppServiceBase {
return
system
.
getResult
(
null
,
"push Fail,interface_info data is empty"
);
}
async
pushBusInfo
(
pobj
,
opType
,
isDelProductInfo
)
{
//推送业务总入口
async
pushBusInfo
(
pobj
,
opType
,
isDelProductInfo
)
{
//推送业务总入口
,不在db中做配置进行调用
var
interface_list
=
pobj
.
interface_info
?
pobj
.
interface_info
:
pobj
.
actionBody
.
product_info
.
interface_info
;
if
(
!
interface_list
)
{
return
system
.
getResult
(
null
,
"暂无推送配置"
);
...
...
center-channel/app/config/settings.js
View file @
832d845d
...
...
@@ -25,7 +25,7 @@ var settings = {
port
:
process
.
env
.
NODE_PORT
||
4012
,
opPushQueueUrl
:
function
()
{
if
(
this
.
env
==
"dev"
||
this
.
env
==
"test"
)
{
return
"http://192.168.
210.205
:4018/api/queueAction/producer/springBoard"
;
return
"http://192.168.
18.101
:4018/api/queueAction/producer/springBoard"
;
}
else
{
return
"http://sytxpublic-msgq-service/api/queueAction/producer/springBoard"
;
}
...
...
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