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
635f5f65
Commit
635f5f65
authored
Mar 16, 2021
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
cd3291ca
e9fc92d6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
27 deletions
+60
-27
center-channel/app/base/api/impl/opreceive/need.js
+3
-0
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+4
-2
center-channel/app/base/service/impl/common/centerorderSve.js
+16
-2
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+12
-12
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
+23
-3
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+2
-8
No files found.
center-channel/app/base/api/impl/opreceive/need.js
View file @
635f5f65
...
@@ -127,6 +127,9 @@ class Need extends APIBase {
...
@@ -127,6 +127,9 @@ class Need extends APIBase {
case
"importNeeds"
:
case
"importNeeds"
:
opResult
=
await
this
.
utilsNeedSve
.
importNeeds
(
pobj
,
req
);
opResult
=
await
this
.
utilsNeedSve
.
importNeeds
(
pobj
,
req
);
break
;
break
;
case
"getymicpProduce"
:
//获取易名的icp产品信息
opResult
=
await
this
.
centerorderSve
.
getymicpProduce
(
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/baseCenterOrderSve.js
View file @
635f5f65
...
@@ -86,6 +86,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -86,6 +86,7 @@ class BaseCenterOrderService extends AppServiceBase {
//提交Icp注册方案
//提交Icp注册方案
async
submitIcpProgramme
(
pobj
)
{
async
submitIcpProgramme
(
pobj
)
{
console
.
log
(
'提交Icp注册方案---'
,
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
&&
res
.
data
.
needinfo
&&
res
.
data
.
needsolution
)
{
if
(
res
&&
res
.
status
==
0
&&
res
.
data
&&
res
.
data
.
needinfo
&&
res
.
data
.
needsolution
)
{
var
needinfo
=
res
.
data
.
needinfo
;
//需求信息
var
needinfo
=
res
.
data
.
needinfo
;
//需求信息
...
@@ -158,8 +159,9 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -158,8 +159,9 @@ class BaseCenterOrderService extends AppServiceBase {
if
(
needinfo
.
uapp_id
==
uappId
.
ename
){
if
(
needinfo
.
uapp_id
==
uappId
.
ename
){
//推送数据至易名
//推送数据至易名
// var bizType = needinfo.channelTypeCode;//业务类型里
// var bizType = needinfo.channelTypeCode;//业务类型里
solution
.
Area
=
cityLetter
[
solution
.
Area
]
//
solution.Area = cityLetter[solution.Area]
console
.
log
(
'solution.Area++'
,
solution
.
Area
)
console
.
log
(
'solution.Area++'
,
solution
.
Area
)
console
.
log
(
'solution++'
,
solution
)
var
pushObj
=
{
var
pushObj
=
{
IntentionBizId
:
needinfo
.
channelNeedNo
,
IntentionBizId
:
needinfo
.
channelNeedNo
,
CompanyName
:
solution
.
CompanyName
,
CompanyName
:
solution
.
CompanyName
,
...
@@ -319,7 +321,7 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -319,7 +321,7 @@ class BaseCenterOrderService extends AppServiceBase {
};
};
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
console
.
log
(
"保存渠道方案id aaaa++ "
,
a
)
console
.
log
(
"保存渠道方案id aaaa++ "
,
a
)
if
(
a
&&
a
.
status
==
0
&&
resData
.
ConfirmUrl
)
{
if
(
a
&&
a
.
status
==
0
&&
pushRes
.
ConfirmUrl
)
{
var
reqObj3
=
{
var
reqObj3
=
{
actionType
:
"receiveIcpConfirmUrl"
,
actionType
:
"receiveIcpConfirmUrl"
,
appInfo
:
appInfo
,
appInfo
:
appInfo
,
...
...
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
635f5f65
...
@@ -650,9 +650,14 @@ class CenterorderService extends AppServiceBase {
...
@@ -650,9 +650,14 @@ class CenterorderService extends AppServiceBase {
if
(
pobj
&&
pobj
.
appInfo
&&
pobj
.
appInfo
.
uapp_id
&&
pobj
.
appInfo
.
uapp_id
==
'52'
){
if
(
pobj
&&
pobj
.
appInfo
&&
pobj
.
appInfo
.
uapp_id
&&
pobj
.
appInfo
.
uapp_id
==
'52'
){
if
(
pobj
.
actionBody
.
channelItemCode
==
'5'
)
{
if
(
pobj
.
actionBody
.
channelItemCode
==
'5'
)
{
pobj
.
actionBody
.
regType
=
"
ename
.icp"
;
pobj
.
actionBody
.
regType
=
"
yiming
.icp"
;
}
else
if
(
pobj
.
actionBody
.
channelItemCode
==
'7'
)
{
}
else
if
(
pobj
.
actionBody
.
channelItemCode
==
'7'
)
{
pobj
.
actionBody
.
regType
=
"ename.edi"
;
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
=
{
var
fqobj
=
{
...
@@ -715,9 +720,18 @@ class CenterorderService extends AppServiceBase {
...
@@ -715,9 +720,18 @@ class CenterorderService extends AppServiceBase {
}
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
//获取易名的icp产品信息
async
getymicpProduce
(
pobj
)
{
pobj
.
actionType
=
'getymicpProduce'
let
url
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
return
await
this
.
restPostUrl
(
pobj
,
url
);
}
}
}
module
.
exports
=
CenterorderService
;
module
.
exports
=
CenterorderService
;
// var task = new CenterorderService();
// var task = new CenterorderService();
// var pobj={
// var pobj={
// "actionType":"submitProgramme",
// "actionType":"submitProgramme",
// "actionBody":{
// "actionBody":{
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
635f5f65
...
@@ -1436,11 +1436,17 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -1436,11 +1436,17 @@ class UtilsNeedService extends AppServiceBase {
if
(
pobj
.
appInfo
&&
pobj
.
appInfo
.
uapp_id
&&
pobj
.
appInfo
.
uapp_id
==
"52"
){
if
(
pobj
.
appInfo
&&
pobj
.
appInfo
.
uapp_id
&&
pobj
.
appInfo
.
uapp_id
==
"52"
){
if
(
pobj
.
actionBody
.
channel_type_code
==
5
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
5
)
{
pobj
.
actionBody
.
type
=
"
ename
.icp"
;
pobj
.
actionBody
.
type
=
"
yiming
.icp"
;
pobj
.
actionBody
.
idempotentSource
=
"
ename_
icp"
;
pobj
.
actionBody
.
idempotentSource
=
"
yiming.
icp"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
7
)
{
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
7
)
{
pobj
.
actionBody
.
type
=
"ename.edi"
;
pobj
.
actionBody
.
type
=
"yiming.edi"
;
pobj
.
actionBody
.
idempotentSource
=
"ename_edi"
;
pobj
.
actionBody
.
idempotentSource
=
"yiming.edi"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
"icpnb"
)
{
pobj
.
actionBody
.
type
=
"yiming.icpnb"
;
pobj
.
actionBody
.
idempotentSource
=
"yiming.icpnb"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
"edinb"
)
{
pobj
.
actionBody
.
type
=
"yiming.edinb"
;
pobj
.
actionBody
.
idempotentSource
=
"yiming.edinb"
;
}
}
}
}
if
(
pobj
.
actionBody
.
description
&&
pobj
.
actionBody
.
description
.
indexOf
(
"备#"
)
<
0
)
{
if
(
pobj
.
actionBody
.
description
&&
pobj
.
actionBody
.
description
.
indexOf
(
"备#"
)
<
0
)
{
...
@@ -1591,14 +1597,8 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -1591,14 +1597,8 @@ class UtilsNeedService extends AppServiceBase {
return
system
.
getResultFail
(
-
1
,
'渠道id 不能为空'
);
return
system
.
getResultFail
(
-
1
,
'渠道id 不能为空'
);
}
}
pobj
.
actionType
=
'bulkCreateNeeds'
;
pobj
.
actionType
=
'bulkCreateNeeds'
;
let
result
=
await
this
.
execPostByTimeOut
(
req
,
pobj
,
url
,
"json"
,
null
,
60
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
!
result
||
result
.
status
!=
0
)
{
return
result
;
return
system
.
getResult
(
null
,
result
.
msg
);
}
if
(
!
result
.
data
||
result
.
data
.
status
!=
0
)
{
return
system
.
getResult
(
null
,
result
.
data
.
msg
);
}
return
system
.
getResult
(
result
.
data
.
data
);
}
}
/**
/**
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
View file @
635f5f65
...
@@ -6,8 +6,9 @@ const { json } = require("sequelize");
...
@@ -6,8 +6,9 @@ const { json } = require("sequelize");
const
{
getResult
,
getResultSuccess
}
=
require
(
"../../../system"
);
const
{
getResult
,
getResultSuccess
}
=
require
(
"../../../system"
);
//区分渠道的uappid
//区分渠道的uappid
const
uappId
=
{
const
uappId
=
{
'ali'
:
"18"
,
//(阿里icp、edi)
'ali'
:
18
,
//(阿里icp、edi)
'baidu'
:
"44"
//(百度icp、edi)
'baidu'
:
44
,
//(百度icp、edi)
'ename'
:
52
}
}
//需求操作类----ali对接的需求
//需求操作类----ali对接的需求
class
UtilsNeedService2
extends
AppServiceBase
{
class
UtilsNeedService2
extends
AppServiceBase
{
...
@@ -517,6 +518,11 @@ class UtilsNeedService2 extends AppServiceBase {
...
@@ -517,6 +518,11 @@ class UtilsNeedService2 extends AppServiceBase {
var
ress
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/communication"
,
reqbody
:
{
requirementId
:
pobj
.
actionBody
.
intentionBizId
,
content
:
pobj
.
actionBody
.
note
}
});
var
ress
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/communication"
,
reqbody
:
{
requirementId
:
pobj
.
actionBody
.
intentionBizId
,
content
:
pobj
.
actionBody
.
note
}
});
console
.
log
(
"baidu+res"
,
ress
)
console
.
log
(
"baidu+res"
,
ress
)
}
}
if
(
result
.
data
==
uappId
.
ename
)
{
console
.
log
(
'settings.enameClientUrl()+"WriteCommunicationLog"----'
,
settings
.
enameClientUrl
()
+
"WriteCommunicationLog"
)
var
resss
=
await
self
.
execClient
.
execEnamePost
({
IntentionBizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
settings
.
enameClientUrl
()
+
"WriteCommunicationLog"
);
console
.
log
(
"ename+resss"
,
resss
)
}
}
}
//推送交付系统
//推送交付系统
...
@@ -546,7 +552,7 @@ class UtilsNeedService2 extends AppServiceBase {
...
@@ -546,7 +552,7 @@ class UtilsNeedService2 extends AppServiceBase {
async
queryExpertApplyCommunicationLogs
(
pobj
)
{
async
queryExpertApplyCommunicationLogs
(
pobj
)
{
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'jilu+++result++++'
,
result
)
console
.
log
(
'jilu+++result++++
1--
'
,
result
)
if
(
result
&&
result
.
status
==
0
&&
result
.
data
&&
result
.
data
.
uapp_id
)
{
if
(
result
&&
result
.
status
==
0
&&
result
.
data
&&
result
.
data
.
uapp_id
)
{
if
(
result
.
data
.
uapp_id
==
uappId
.
ali
)
{
if
(
result
.
data
.
uapp_id
==
uappId
.
ali
)
{
var
res
=
await
this
.
aliclient
.
reqbyget
({
var
res
=
await
this
.
aliclient
.
reqbyget
({
...
@@ -576,6 +582,20 @@ class UtilsNeedService2 extends AppServiceBase {
...
@@ -576,6 +582,20 @@ class UtilsNeedService2 extends AppServiceBase {
});
});
console
.
log
(
'xxcc+++'
,
res
)
console
.
log
(
'xxcc+++'
,
res
)
}
}
if
(
result
.
data
.
uapp_id
==
uappId
.
ename
)
{
// yiming / ename
console
.
log
(
"queryExpertApplyCommunicationLogs---ename---pobj--"
,
pobj
)
console
.
log
(
'settings.enameClientUrl()+"queryExpertApplyCommunicationLogs"----'
,
settings
.
enameClientUrl
()
+
"queryExpertApplyCommunicationLogs"
)
var
res
=
await
self
.
execClient
.
execEnamePost
({
BeginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
EndTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
BizId
:
pobj
.
actionBody
.
intentionBizId
,
UserFeedBack
:
pobj
.
actionBody
.
userFeedBack
||
true
,
PageNum
:
pobj
.
actionBody
.
pageNum
||
1
,
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
settings
.
enameClientUrl
()
+
"queryExpertApplyCommunicationLogs"
);
console
.
log
(
'ename+++queryExpertApplyCommunicationLogs---res---'
,
res
)
}
}
}
if
(
res
&&
res
.
data
&&
res
.
data
.
result
){
if
(
res
&&
res
.
data
&&
res
.
data
.
result
){
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
635f5f65
...
@@ -300,14 +300,8 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -300,14 +300,8 @@ class UtilsOrderService extends AppServiceBase {
return
system
.
getResultFail
(
-
1
,
'渠道id 不能为空'
);
return
system
.
getResultFail
(
-
1
,
'渠道id 不能为空'
);
}
}
pobj
.
actionType
=
'bulkCreateOrders'
;
pobj
.
actionType
=
'bulkCreateOrders'
;
let
result
=
await
this
.
execPostByTimeOut
(
req
,
pobj
,
url
,
"json"
,
null
,
60
);
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
!
result
||
result
.
status
!=
0
)
{
return
result
;
return
system
.
getResult
(
null
,
result
.
msg
);
}
if
(
!
result
.
data
||
result
.
data
.
status
!=
0
)
{
return
system
.
getResult
(
null
,
result
.
data
.
msg
);
}
return
system
.
getResultSuccess
(
result
.
data
.
data
==
null
?[]:
result
.
data
.
data
);
}
}
async
getOrderDetails
(
pobj
,
actionBody
)
{
async
getOrderDetails
(
pobj
,
actionBody
)
{
...
...
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