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
a9b342f5
Commit
a9b342f5
authored
Nov 25, 2020
by
兰国旗
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
laolan
parent
8958cc56
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
565 additions
and
583 deletions
+565
-583
center-channel/app/base/api/impl/action/qcapi.js
+2
-37
center-channel/app/base/api/impl/icp/queueNotify.js
+6
-0
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+355
-69
center-channel/app/base/service/impl/common/ncSve.js
+75
-222
center-channel/app/base/service/impl/common/rtSve.js
+81
-224
center-channel/app/base/service/impl/common/signSve.js
+28
-5
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
+2
-18
center-channel/app/base/utils/baiduClient.js
+9
-1
center-channel/app/config/businessConfig.js
+4
-4
center-channel/app/config/localsettings.js
+3
-3
No files found.
center-channel/app/base/api/impl/action/qcapi.js
View file @
a9b342f5
...
...
@@ -58,9 +58,6 @@ class QcAPI extends APIBase {
// --------- 网文 ---------
case
"ncGetNeedList"
:
//查询需求列表(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncGetNeedList
(
pobj
);
break
;
case
"ncSubmitMaterial"
:
//交付材料提交(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncSubmitMaterial
(
pobj
);
break
;
...
...
@@ -70,27 +67,10 @@ class QcAPI extends APIBase {
case
"ncSubmitSolution"
:
//提交方案(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncSubmitSolution
(
pobj
);
break
;
case
"ncWriteCommunicationRecord"
:
//提交沟通记录(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncWriteCommunicationRecord
(
pobj
);
break
;
case
"ncGetCommunicationRecord"
:
//查询沟通记录(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncGetCommunicationRecord
(
pobj
);
break
;
case
"ncCloseNeed"
:
//关闭需求(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncCloseNeed
(
pobj
);
break
;
case
"ncClosePlan"
:
//关闭方案(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncClosePlan
(
pobj
);
break
;
case
"ncCloseOrderDelivery"
:
//关闭交付单(网文)2020-11-11
opResult
=
await
this
.
ncSve
.
ncCloseOrderDelivery
(
pobj
);
break
;
// --------- 广电 ---------
case
"rtGetNeedList"
:
//查询需求列表(广电)2020-11-11
opResult
=
await
this
.
rtSve
.
rtGetNeedList
(
pobj
);
break
;
case
"rtSubmitMaterial"
:
//交付材料提交(广电)2020-11-11
opResult
=
await
this
.
rtSve
.
rtSubmitMaterial
(
pobj
);
break
;
...
...
@@ -100,23 +80,8 @@ class QcAPI extends APIBase {
case
"rtSubmitSolution"
:
//提交方案(广电)2020-11-11
opResult
=
await
this
.
rtSve
.
rtSubmitSolution
(
pobj
);
break
;
case
"rtWriteCommunicationRecord"
:
//提交沟通记录(广电)2020-11-11
opResult
=
await
this
.
rtSve
.
rtWriteCommunicationRecord
(
pobj
);
break
;
case
"rtGetCommunicationRecord"
:
//查询沟通记录(广电)2020-11-11
opResult
=
await
this
.
rtSve
.
rtGetCommunicationRecord
(
pobj
);
break
;
case
"rtCloseNeed"
:
//关闭需求(广电)2020-11-11
opResult
=
await
this
.
rtSve
.
rtCloseNeed
(
pobj
);
break
;
case
"rtClosePlan"
:
//关闭方案(广电)2020-11-11
opResult
=
await
this
.
rtSve
.
rtClosePlan
(
pobj
);
break
;
case
"rtCloseOrderDelivery"
:
//关闭交付单(广电)2020-11-11
opResult
=
await
this
.
rtSve
.
rtCloseOrderDelivery
(
pobj
);
break
;
// --------- 推送icp信息至渠道和作方 zhuangbing-20201116--------
// --------- 推送icp信息至渠道和作方 zhuangbing-20201116--------
case
"pushIcpSolution2Channel"
:
//推送ICP方案至渠道(百度)
opResult
=
await
this
.
baseOrderSve
.
pushIcpSolution2Channel
(
pobj
);
break
;
...
...
center-channel/app/base/api/impl/icp/queueNotify.js
View file @
a9b342f5
...
...
@@ -26,6 +26,12 @@ class QueueNotify extends APIBase {
case
"pushIcpSolution2Channel"
:
//推送ICP方案至渠道(百度)
opResult
=
await
this
.
baseOrderSve
.
pushIcpSolution2Channel
(
pobj
);
break
;
case
"serviceProviderSubmit2Material"
:
//推送资料至渠道(百度)
opResult
=
await
this
.
baseOrderSve
.
serviceProviderSubmit2Material
(
pobj
);
break
;
case
"serviceProvider2Notification"
:
//推送通知状态至渠道(百度)
opResult
=
await
this
.
baseOrderSve
.
serviceProvider2Notification
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
View file @
a9b342f5
...
...
@@ -339,109 +339,395 @@ class BaseCenterOrderService extends AppServiceBase {
return
res
;
}
//交付材料提交
async
serviceProviderSubmitMaterial
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
var
material
=
ab
.
material
;
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//队列推送材料
async
serviceProviderSubmit2Material
(
pobj
)
{
console
.
log
(
"serviceProviderSubmit2Material+++++pobj+++"
,
pobj
)
var
actionBody
=
pobj
.
actionBody
;
var
appInfo
=
pobj
.
appInfo
;
var
pushRes
=
{
status
:
-
1
,
msg
:
"推送失败"
};
if
(
actionBody
){
if
(
actionBody
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
var
pushObj
=
{
"BizId"
:
BizId
,
"Domain"
:
material
.
Domain
,
"CorporateName"
:
material
.
CorporateName
,
"IncludeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"PartnerBusinessLicense"
:
material
.
PartnerBusinessLicense
,
"PartnerIdCardList"
:
material
.
PartnerIdCardList
,
"PartnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"PartnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"PartnerPlan"
:
material
.
PartnerPlan
||
""
,
"PartnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"PartnerLaw"
:
material
.
PartnerLaw
||
""
,
"PartnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"PartnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
"PartnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
"BizId"
:
actionBody
.
BizId
,
"Domain"
:
actionBody
.
Domain
,
"CorporateName"
:
actionBody
.
CorporateName
,
"IncludeForeignInvestment"
:
actionBody
.
IncludeForeignInvestment
,
"PartnerBusinessLicense"
:
actionBody
.
PartnerBusinessLicense
,
"PartnerIdCardList"
:
actionBody
.
PartnerIdCardList
,
"PartnerDomainCertificate"
:
actionBody
.
PartnerDomainCertificate
,
"PartnerPreviewOtherList"
:
actionBody
.
PartnerPreviewOtherList
||
[],
"PartnerPlan"
:
actionBody
.
PartnerPlan
||
""
,
"PartnerForeignInvestment"
:
actionBody
.
PartnerForeignInvestment
||
""
,
"PartnerLaw"
:
actionBody
.
PartnerLaw
||
""
,
"PartnerStampOtherList"
:
actionBody
.
PartnerStampOtherList
||
[],
"PartnerSignOtherList"
:
actionBody
.
PartnerSignOtherList
||
[],
"PartnerSignAndStampOtherList"
:
actionBody
.
PartnerSignAndStampOtherList
||
[]
};
var
self
=
this
;
//推送方案材料
self
.
aliclient
.
reqbyget
({
action
:
"SavePartnerSubmitMaterial"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
var
ali
=
self
.
aliclient
.
reqbyget
({
action
:
"SavePartnerSubmitMaterial"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
console
.
log
(
'ali ----- +++'
,
ali
)
if
(
ali
&&
ali
.
status
==
200
){
var
aliFlag
=
200
}
else
{
var
aliFlag
=
-
200
}
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
actionBody
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
var
BizId
=
needsolution
.
orderChannelNo
;
console
.
log
(
'BizId++'
,
BizId
)
var
pushObj
=
{
"businessLicense"
:
{
"
createdAt"
:
material
.
BusinessLicense
.
CreatedAt
||
""
,
"
enterpriseCode"
:
material
.
BusinessLicense
.
EnterpriseCode
||
""
,
"
legalRepresentative"
:
material
.
BusinessLicense
.
LegalRepresentative
||
""
,
"
address"
:
material
.
BusinessLicense
.
Address
||
""
,
"
registeredCapital"
:
material
.
BusinessLicense
.
RegisteredCapital
||
""
,
"name"
:
material
.
BusinessLicense
.
N
ame
||
""
,
"
businessTerm"
:
material
.
BusinessLicense
.
BusinessTerm
||
""
,
"
type"
:
material
.
BusinessLicense
.
Type
||
""
,
"
scopeBusiness"
:
material
.
BusinessLicense
.
ScopeBusiness
||
""
"
address"
:
actionBody
.
businessLicense
.
address
||
""
,
"
businessTerm"
:
actionBody
.
businessLicense
.
businessTerm
||
""
,
"
createdAt"
:
actionBody
.
businessLicense
.
createdAt
||
""
,
"
enterpriseCode"
:
actionBody
.
businessLicense
.
enterpriseCode
||
""
,
"
legalRepresentative"
:
actionBody
.
businessLicense
.
legalRepresentative
||
""
,
"name"
:
actionBody
.
businessLicense
.
n
ame
||
""
,
"
registeredCapital"
:
actionBody
.
businessLicense
.
registeredCapital
||
""
,
"
scopeBusiness"
:
actionBody
.
businessLicense
.
scopeBusiness
||
""
,
"
type"
:
actionBody
.
businessLicense
.
type
||
""
},
"
partnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"
orderNo"
:
BizId
,
"
domain"
:
material
.
Domain
,
"
corporateName"
:
material
.
CorporateName
,
"
includeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"partnerBusinessLicense"
:
material
.
P
artnerBusinessLicense
,
"partnerIdCardList"
:
material
.
P
artnerIdCardList
,
"partnerDomainCertificate"
:
material
.
P
artnerDomainCertificate
,
"partnerPreviewOtherList"
:
material
.
P
artnerPreviewOtherList
||
[],
"partnerPlan"
:
material
.
P
artnerPlan
||
""
,
"partnerLaw"
:
material
.
P
artnerLaw
||
""
,
"partnerStampOtherList"
:
material
.
P
artnerStampOtherList
||
[],
"partnerSignOtherList"
:
material
.
P
artnerSignOtherList
||
[],
"partnerSignAndStampOtherList"
:
material
.
P
artnerSignAndStampOtherList
||
[]
"
domain"
:
actionBody
.
domain
,
"
corporateName"
:
actionBody
.
corporateName
,
"
includeForeignInvestment"
:
actionBody
.
includeForeignInvestment
,
"
orderNo"
:
actionBody
.
orderNo
,
"
partnerForeignInvestment"
:
actionBody
.
partnerForeignInvestment
||
""
,
"partnerBusinessLicense"
:
actionBody
.
p
artnerBusinessLicense
,
"partnerIdCardList"
:
actionBody
.
p
artnerIdCardList
,
"partnerDomainCertificate"
:
actionBody
.
p
artnerDomainCertificate
,
"partnerPreviewOtherList"
:
actionBody
.
p
artnerPreviewOtherList
||
[],
"partnerPlan"
:
actionBody
.
p
artnerPlan
||
""
,
"partnerLaw"
:
actionBody
.
p
artnerLaw
||
""
,
"partnerStampOtherList"
:
actionBody
.
p
artnerStampOtherList
||
[],
"partnerSignOtherList"
:
actionBody
.
p
artnerSignOtherList
||
[],
"partnerSignAndStampOtherList"
:
actionBody
.
p
artnerSignAndStampOtherList
||
[]
};
var
self
=
this
;
//推送方案材料
var
r
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material"
,
reqbody
:
pushObj
});
console
.
log
(
'rrrr+++++'
,
r
)
var
baidu
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material"
,
reqbody
:
pushObj
});
console
.
log
(
'baidu -----+++++'
,
baidu
)
if
(
baidu
&&
baidu
.
data
&&
baidu
.
data
.
result
){
var
baiduFlag
=
200
}
else
{
var
baiduFlag
=
-
200
}
console
.
log
(
'hhhhh+++baiduFlag+++'
,
baiduFlag
)
}
return
system
.
getResultSuccess
();
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"app/base/service/impl/common/baseCenterOrderSve.js/serviceProviderSubmit2Material"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
JSON
.
stringify
(
pushRes
),
optitle
:
"serviceProviderSubmit2Material推送ICP材料至渠道方->serviceProviderSubmit2Material"
,
});
}
return
res
;
if
(
aliFlag
==
200
||
baiduFlag
==
200
){
// pushRes.status = 1
return
system
.
getResultRedisQueueSuccess
();
}
return
pushRes
;
}
//交付材料提交
async
serviceProviderSubmitMaterial
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
console
.
log
(
'zzzzlllll+++++'
,
res
)
console
.
log
(
'zzzzlllll++pobj+++'
,
pobj
)
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
var
material
=
ab
.
material
;
var
reqPushParams
=
{};
if
(
ab
.
isTest
&&
ab
.
isTest
==
1
){
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
reqPushParams
=
{
actionBody
:
{
"uapp_id"
:
res
.
data
.
uapp_id
,
"BizId"
:
BizId
,
"Domain"
:
material
.
Domain
,
"CorporateName"
:
material
.
CorporateName
,
"IncludeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"PartnerBusinessLicense"
:
material
.
PartnerBusinessLicense
,
"PartnerIdCardList"
:
material
.
PartnerIdCardList
,
"PartnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"PartnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"PartnerPlan"
:
material
.
PartnerPlan
||
""
,
"PartnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"PartnerLaw"
:
material
.
PartnerLaw
||
""
,
"PartnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"PartnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
"PartnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
},
appInfo
:
pobj
.
appInfo
};
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
var
BizId
=
needsolution
.
orderChannelNo
;
console
.
log
(
'BizId++'
,
BizId
)
console
.
log
(
'productType++'
,
res
.
data
.
productType
)
reqPushParams
=
{
actionBody
:
{
"uapp_id"
:
res
.
data
.
uapp_id
,
"businessLicense"
:
{
"address"
:
material
.
BusinessLicense
.
Address
||
""
,
"businessTerm"
:
material
.
BusinessLicense
.
BusinessTerm
||
""
,
"createdAt"
:
material
.
BusinessLicense
.
CreatedAt
||
""
,
"enterpriseCode"
:
material
.
BusinessLicense
.
EnterpriseCode
||
""
,
"legalRepresentative"
:
material
.
BusinessLicense
.
LegalRepresentative
||
""
,
"name"
:
material
.
BusinessLicense
.
Name
||
""
,
"registeredCapital"
:
material
.
BusinessLicense
.
RegisteredCapital
||
""
,
"scopeBusiness"
:
material
.
BusinessLicense
.
ScopeBusiness
||
""
,
"type"
:
material
.
BusinessLicense
.
Type
||
""
},
"corporateName"
:
material
.
CorporateName
,
"domain"
:
material
.
Domain
,
"includeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"orderNo"
:
BizId
,
"partnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"partnerBusinessLicense"
:
material
.
PartnerBusinessLicense
,
"partnerIdCardList"
:
material
.
PartnerIdCardList
,
"partnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"partnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"partnerPlan"
:
material
.
PartnerPlan
||
""
,
"partnerLaw"
:
material
.
PartnerLaw
||
""
,
"partnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"partnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
"partnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
},
appInfo
:
pobj
.
appInfo
}
}
var
result
=
await
this
.
utilsPushSve
.
business2Channel
(
reqPushParams
,
"serviceProviderSubmit2Material"
);
console
.
log
(
'result+++-cailiao--++++----'
,
result
)
console
.
log
(
'result+++-reqPushParams--++++----'
,
reqPushParams
)
}
else
{
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
var
pushObj
=
{
"BizId"
:
BizId
,
"Domain"
:
material
.
Domain
,
"CorporateName"
:
material
.
CorporateName
,
"IncludeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"PartnerBusinessLicense"
:
material
.
PartnerBusinessLicense
,
"PartnerIdCardList"
:
material
.
PartnerIdCardList
,
"PartnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"PartnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"PartnerPlan"
:
material
.
PartnerPlan
||
""
,
"PartnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"PartnerLaw"
:
material
.
PartnerLaw
||
""
,
"PartnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"PartnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
"PartnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
};
var
self
=
this
;
//推送方案材料
var
ali
=
self
.
aliclient
.
reqbyget
({
action
:
"SavePartnerSubmitMaterial"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
console
.
log
(
'ali tui ziliao ++'
,
ali
)
if
(
ali
&&
ali
.
status
==
200
){
var
aliFlag
=
200
}
else
{
var
aliFlag
=
-
200
}
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
var
BizId
=
needsolution
.
orderChannelNo
;
console
.
log
(
'BizId++'
,
BizId
)
var
pushObj
=
{
"businessLicense"
:
{
"createdAt"
:
material
.
BusinessLicense
.
CreatedAt
||
""
,
"enterpriseCode"
:
material
.
BusinessLicense
.
EnterpriseCode
||
""
,
"legalRepresentative"
:
material
.
BusinessLicense
.
LegalRepresentative
||
""
,
"address"
:
material
.
BusinessLicense
.
Address
||
""
,
"registeredCapital"
:
material
.
BusinessLicense
.
RegisteredCapital
||
""
,
"name"
:
material
.
BusinessLicense
.
Name
||
""
,
"businessTerm"
:
material
.
BusinessLicense
.
BusinessTerm
||
""
,
"type"
:
material
.
BusinessLicense
.
Type
||
""
,
"scopeBusiness"
:
material
.
BusinessLicense
.
ScopeBusiness
||
""
},
"partnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"orderNo"
:
BizId
,
"domain"
:
material
.
Domain
,
"corporateName"
:
material
.
CorporateName
,
"includeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"partnerBusinessLicense"
:
material
.
PartnerBusinessLicense
,
"partnerIdCardList"
:
material
.
PartnerIdCardList
,
"partnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"partnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"partnerPlan"
:
material
.
PartnerPlan
||
""
,
"partnerLaw"
:
material
.
PartnerLaw
||
""
,
"partnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"partnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
"partnerSignAndStampOtherList"
:
material
.
PartnerSignAndStampOtherList
||
[]
};
var
self
=
this
;
//推送方案材料
var
baidu
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material"
,
reqbody
:
pushObj
});
console
.
log
(
'baidu tui ziliao +++++'
,
baidu
)
console
.
log
(
'baidu pushObj ziliao +++++'
,
pushObj
)
if
(
baidu
&&
baidu
.
data
&&
baidu
.
data
.
result
){
var
baiduFlag
=
200
}
else
{
var
baiduFlag
=
-
200
}
}
if
(
aliFlag
==
200
||
baiduFlag
==
200
){
return
system
.
getResultSuccess
();
}
}
console
.
log
(
'rsrsr++++------------++++'
,
res
)
return
res
}
}
//队列通知交付状态变更
async
serviceProvider2Notification
(
pobj
){
console
.
log
(
"serviceProvider2Notification+++++pobj+++"
,
pobj
)
var
actionBody
=
pobj
.
actionBody
;
var
appInfo
=
pobj
.
appInfo
;
var
pushRes
=
{
status
:
-
1
,
msg
:
"推送失败"
};
if
(
actionBody
){
if
(
actionBody
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
var
pushObj
=
{
BizId
:
actionBody
.
BizId
,
OfficialFileURL
:
actionBody
.
OfficialFileURL
,
ApplicationStatus
:
actionBody
.
ApplicationStatus
};
//推送状态变更
var
ali
=
await
this
.
aliclient
.
reqbyget
({
action
:
"AcceptPartnerNotification"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
console
.
log
(
'状态变更 ali ----- +++'
,
ali
)
if
(
ali
&&
ali
.
status
==
200
){
var
aliFlag
=
200
}
else
{
var
aliFlag
=
-
200
}
}
if
(
actionBody
.
uapp_id
==
uappId
.
baidu
){
// actionBody.ApplicationStatus = baiduIcpStatus[actionBody.ApplicationStatus];
//推送数据至百度
var
pushObj
=
{
orderNo
:
actionBody
.
orderNo
,
status
:
actionBody
.
status
};
console
.
log
(
'pushObj 推送状态变更 +++++'
,
pushObj
)
//推送状态变更
var
baidu
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
console
.
log
(
'baidu 推送状态变更 +++++'
,
baidu
)
if
(
baidu
&&
baidu
.
data
&&
baidu
.
data
.
result
){
var
baiduFlag
=
200
}
else
{
var
baiduFlag
=
-
200
}
}
this
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"app/base/service/impl/common/baseCenterOrderSve.js/serviceProvider2Notification"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
JSON
.
stringify
(
pushRes
),
optitle
:
"serviceProvider2Notification推送ICP材料至渠道方->serviceProvider2Notification"
,
});
}
if
(
aliFlag
==
200
||
baiduFlag
==
200
){
pushRes
.
status
=
1
return
system
.
getResultRedisQueueSuccess
();
}
return
pushRes
;
}
//通知交付状态变更
async
serviceProviderNotification
(
pobj
)
{
console
.
log
(
'zhuangtai ++++'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
if
(
pobj
.
actionBody
.
isTest
&&
pobj
.
actionBody
.
isTest
==
1
){
var
reqPushParams
=
{};
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
reqPushParams
=
{
actionBody
:
{
uapp_id
:
res
.
data
.
uapp_id
,
BizId
:
res
.
data
.
BizId
,
OfficialFileURL
:
res
.
data
.
OfficialFileURL
,
ApplicationStatus
:
res
.
data
.
ApplicationStatus
},
appInfo
:
pobj
.
appInfo
}
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
res
.
data
.
ApplicationStatus
=
baiduIcpStatus
[
res
.
data
.
ApplicationStatus
];
//推送数据至百度
reqPushParams
=
{
actionBody
:{
uapp_id
:
res
.
data
.
uapp_id
,
orderNo
:
res
.
data
.
channelOrderNo
,
status
:
res
.
data
.
ApplicationStatus
},
appInfo
:
pobj
.
appInfo
}
}
var
result
=
await
this
.
utilsPushSve
.
business2Channel
(
reqPushParams
,
"serviceProvider2Notification"
);
console
.
log
(
'reqPushParams+++-状态变更--++++----'
,
reqPushParams
)
console
.
log
(
'result+++-状态变更--++++----'
,
result
)
}
else
{
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
var
pushObj
=
{
BizId
:
res
.
data
.
BizId
,
OfficialFileURL
:
res
.
data
.
OfficialFileURL
,
ApplicationStatus
:
res
.
data
.
ApplicationStatus
};
//推送状态变更
this
.
aliclient
.
reqbyget
({
action
:
"AcceptPartnerNotification"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
var
ali
=
await
this
.
aliclient
.
reqbyget
({
action
:
"AcceptPartnerNotification"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
if
(
ali
&&
ali
.
status
==
200
){
var
aliFlag
=
200
}
else
{
var
aliFlag
=
-
200
}
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
res
.
data
.
ApplicationStatus
=
baiduIcpStatus
[
res
.
data
.
ApplicationStatus
];
console
.
log
(
'res.data.channelOrderNo'
,
res
.
data
.
channelOrderNo
)
//推送数据至百度
var
pushObj
=
{
orderNo
:
res
.
data
.
channelOrderNo
,
status
:
res
.
data
.
ApplicationStatus
};
//推送状态变更
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
}
return
system
.
getResultSuccess
();
var
pushObj
=
{
orderNo
:
res
.
data
.
channelOrderNo
,
status
:
res
.
data
.
ApplicationStatus
};
//推送状态变更
var
baidu
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
console
.
log
(
'res.data baidu +++++'
,
baidu
)
if
(
baidu
&&
baidu
.
data
&&
baidu
.
data
.
result
){
var
baiduFlag
=
200
}
else
{
var
baiduFlag
=
-
200
}
}
if
(
aliFlag
==
200
||
baiduFlag
==
200
){
return
system
.
getResultSuccess
();
}
}
return
res
;
}
return
res
;
}
//交付单关闭
async
closeOrderDelivery
(
pobj
)
{
...
...
center-channel/app/base/service/impl/common/ncSve.js
View file @
a9b342f5
...
...
@@ -5,43 +5,12 @@ const { getResultSuccess } = require("../../../system");
//区分渠道的uappid
const
uappId
=
{
'ali'
:
"18"
,
//(阿里
icp、edi
)
'baidu'
:
"44"
//(百度
icp、edi
)
'ali'
:
"18"
,
//(阿里)
'baidu'
:
"44"
//(百度)
}
//推送百度城市拼音转义 2020-11-6
const
cityLetter
=
{
"北京"
:
"BEIJING"
,
"上海"
:
"SHANGHAI"
,
"福建"
:
"FUJIAN"
,
"广西"
:
"GUANGXI"
,
"广东"
:
"GUANGDONG"
,
"安徽"
:
"ANHUI"
,
"河南"
:
"HENAN"
,
"湖北"
:
"HUBEI"
,
"浙江"
:
"ZHEJIANG"
,
"江苏"
:
"JIANGSU"
,
"山东"
:
"SHANDONG"
,
"陕西"
:
"SHANXI_SHAN"
,
"宁夏"
:
"NINGXIA"
,
"甘肃"
:
"GANSU"
,
"新疆"
:
"XINJIANG"
,
"青海"
:
"QINGHAI"
,
"天津"
:
"TIANJIN"
,
"重庆"
:
"CHONGQING"
,
"河北"
:
"HEBEI"
,
"山西"
:
"SHANXI_JIN"
,
"辽宁"
:
"LIAONING"
,
"吉林"
:
"JILIN"
,
"黑龙江"
:
"HEILONGJIANG"
,
"江西"
:
"JIANGXI"
,
"湖南"
:
"HUNAN"
,
"四川"
:
"SUCHUAN"
,
"贵州"
:
"GUIZHOU"
,
"云南"
:
"YUANNAN"
,
"内蒙古"
:
"NEIMENGGU"
,
"西藏"
:
"XIZANG"
,
"外资"
:
"WAIZI"
,
"海南"
:
"HAINAN"
"全国"
:
"QUANGUO"
}
//百度拼音转义 2020-11-11 laolan
...
...
@@ -53,6 +22,14 @@ const baiduIcpStatus = {
511
:
"APPROVED"
,
512
:
"NOT_APPROVED"
};
const
baiduActionType
=
{
"新办"
:
"NEW"
}
const
baiduLicenseType
=
{
"动漫"
:
"COMIC"
,
"音乐"
:
"MUSIC"
}
/**
* 网文相关接口(NC)
*/
...
...
@@ -79,29 +56,6 @@ class NcService extends AppServiceBase {
return
data
;
}
//查询需求列表 2020-11-11 laolan
async
ncGetNeedList
(
pobj
){
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
var
pushObj
=
{
type
:
res
.
data
.
type
,
begin
:
res
.
data
.
begin
||
""
,
end
:
res
.
data
.
end
||
""
,
intentionBizId
:
res
.
data
.
intentionBizId
,
status
:
res
.
data
.
status
,
area
:
res
.
data
.
area
,
pagreSize
:
res
.
data
.
pagreSize
||
10
,
pageNum
:
res
.
data
.
pageNum
||
1
}
//查询需求列表
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
reqbody
:
pushObj
});
console
.
log
(
'nc rrrr+++++'
,
r
)
}
return
getResultSuccess
();
}
return
res
}
//交付材料提交 2020-11-11 laolan
...
...
@@ -110,65 +64,45 @@ class NcService extends AppServiceBase {
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
var
material
=
ab
.
material
;
console
.
log
(
"cailiao ab+++++"
,
ab
)
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
var
bizId
=
needsolution
.
orderChannelNo
;
console
.
log
(
'bizId++'
,
bizId
)
var
pushObj
=
{
"orderNo"
:
bizId
,
"businessLicense"
:
{
"name"
:
material
.
businessLicense
.
name
||
""
,
"type"
:
material
.
businessLicense
.
type
||
""
,
"address"
:
material
.
businessLicense
.
address
||
""
,
"createdAt"
:
material
.
businessLicense
.
createdAt
||
""
,
"businessTerm"
:
material
.
businessLicense
.
businessTerm
||
""
,
"scopeBusiness"
:
material
.
businessLicense
.
scopeBusiness
||
""
,
"enterpriseCode"
:
material
.
businessLicense
.
enterpriseCode
||
""
,
"registeredCapital"
:
material
.
businessLicense
.
registeredCapital
||
""
,
"legalRepresentative"
:
material
.
businessLicense
.
legalRepresentative
||
""
,
},
"partnerBusinessLicense"
:
material
.
partnerBusinessLicense
||
""
,
"legalPersonIdentityCard"
:
material
.
legalPersonIdentityCard
||
""
,
"businessDevelopmentDescription"
:
material
.
businessDevelopmentDescription
||
""
,
"companyPolicy"
:
material
.
companyPolicy
||
""
,
"mainManagement"
:
material
.
mainManagement
||
""
,
"creditCertificateDocument"
:
material
.
creditCertificateDocument
||
""
,
"registeredAddressCertificateDocument"
:
material
.
registeredAddressCertificateDocument
||
""
,
"partnerOtherList"
:
material
.
partnerOtherList
||
""
"type"
:
res
.
data
.
productType
,
"businessLicense"
:
{
"name"
:
ab
.
material
.
businessLicense
.
name
||
""
,
"type"
:
ab
.
material
.
businessLicense
.
type
||
""
,
"address"
:
ab
.
material
.
businessLicense
.
address
||
""
,
"createdAt"
:
ab
.
material
.
businessLicense
.
createdAt
||
""
,
"businessTerm"
:
ab
.
material
.
businessLicense
.
businessTerm
||
""
,
"scopeBusiness"
:
ab
.
material
.
businessLicense
.
scopeBusiness
||
""
,
"enterpriseCode"
:
ab
.
material
.
businessLicense
.
enterpriseCode
||
""
,
"registeredCapital"
:
ab
.
material
.
businessLicense
.
registeredCapital
||
""
,
"legalRepresentative"
:
ab
.
material
.
businessLicense
.
legalRepresentative
||
""
,
},
"material"
:{
"partnerBusinessLicense"
:
ab
.
material
.
partnerBusinessLicense
||
""
,
"legalPersonIdentityCard"
:
ab
.
material
.
legalPersonIdentityCard
||
""
,
"businessDevelopmentDescription"
:
ab
.
material
.
businessDevelopmentDescription
||
""
,
"companyPolicy"
:
ab
.
material
.
companyPolicy
||
""
,
"mainManagement"
:
ab
.
material
.
mainManagement
||
""
,
"creditCertificateDocument"
:
ab
.
material
.
creditCertificateDocument
||
""
,
"registeredAddressCertificateDocument"
:
ab
.
material
.
registeredAddressCertificateDocument
||
""
,
"partnerOtherList"
:
ab
.
material
.
partnerOtherList
||
""
}
};
//推送方案材料
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material"
,
reqbody
:
pushObj
});
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material?NC_RT="
,
reqbody
:
pushObj
});
console
.
log
(
'tttttttttttt++++'
,
pushObj
)
console
.
log
(
'nc rrrr+++++'
,
r
)
}
return
system
.
getResultSuccess
();
}
return
res
;
}
//通知交付状态变更 2020-11-11 laolan
async
ncNotification
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
res
.
data
.
applicationStatus
=
baiduIcpStatus
[
res
.
data
.
applicationStatus
];
console
.
log
(
'nc res.data.channelOrderNo'
,
res
.
data
.
channelOrderNo
)
//推送数据至百度
var
pushObj
=
{
orderNo
:
res
.
data
.
channelOrderNo
,
status
:
res
.
data
.
applicationStatus
,
};
//推送状态变更
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
console
(
"nc tongzhi+++"
,
r
)
}
return
system
.
getResultSuccess
();
}
return
res
;
}
//提交方案 2020-11-11 laolan
async
ncSubmitSolution
(
pobj
)
{
...
...
@@ -177,11 +111,7 @@ class NcService extends AppServiceBase {
console
.
log
(
'nc+++res'
,
res
)
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
console
.
log
(
'nc solutionContent+++'
,
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
reqParams
=
{
...
...
@@ -207,9 +137,12 @@ class NcService extends AppServiceBase {
if
(
res
.
data
.
needinfo
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
var
pushObj
=
{
intentionBizId
:
res
.
data
.
needinfo
.
channelNeedNo
,
bizType
:
res
.
data
.
needinfo
.
bizType
,
solution
:
solution
requirementId
:
pobj
.
actionBody
.
needNo
,
companyName
:
pobj
.
actionBody
.
solutionContent
.
solution
.
CompanyName
,
subType
:
baiduLicenseType
[
pobj
.
actionBody
.
solutionContent
.
solution
.
LicenseType
],
area
:
cityLetter
[
pobj
.
actionBody
.
solutionContent
.
solution
.
Area
],
type
:
pobj
.
actionBody
.
solutionContent
.
solution
.
IcpType
,
actionType
:
baiduActionType
[
pobj
.
actionBody
.
solutionContent
.
solution
.
ActionType
]
};
console
.
log
(
"nc pushObj+++"
,
pushObj
);
var
r
=
await
this
.
pushBaiduNcSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
...
...
@@ -222,8 +155,8 @@ class NcService extends AppServiceBase {
//推送方案baidu 2020-11-11 laolan
async
pushBaiduNcSubmitSolution
(
pushObj
,
solutionNo
,
appInfo
,
self
)
{
//推送
状态变更
var
pushRes
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"///
"
,
reqbody
:
pushObj
});
//推送
提交方案baidu
var
pushRes
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/plan
"
,
reqbody
:
pushObj
});
console
.
log
(
'baidu nc++++pushRes'
,
pushRes
)
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
var
resData
=
pushRes
.
data
;
...
...
@@ -232,89 +165,55 @@ class NcService extends AppServiceBase {
appInfo
:
appInfo
,
actionBody
:
{
solutionNo
:
solutionNo
,
solutionBizId
:
resData
.
SolutionBiz
Id
solutionBizId
:
resData
.
plan
Id
}
};
console
.
log
(
'zhuangtai reqObj2++++'
,
reqObj2
)
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
console
.
log
(
"zhuangtai a++++"
,
a
)
return
a
;
}
}
//提交沟通记录 2020-11-11 laolan
async
ncWriteCommunicationRecord
(
pobj
)
{
console
.
log
(
'nc 提交沟通记录pobj'
,
pobj
)
//通知交付状态变更 2020-11-11 laolan
async
ncNotification
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
console
.
log
(
'nc 提交沟通记录res'
,
res
)
if
(
res
&&
res
.
data
&&
res
.
status
==
0
){
//推送交付系统
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
status
:
"followingUp"
},
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
var
push
=
await
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
if
(
push
&&
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
console
.
log
(
"nc tongzhi++res+++"
,
res
)
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
console
.
log
(
'nc res.data.channelOrderNo'
,
res
.
data
.
channelOrderNo
)
//推送数据至百度
var
pushObj
=
{
intentionBizId
:
pobj
.
actionBody
.
need
No
,
note
:
pobj
.
actionBody
.
note
orderNo
:
res
.
data
.
channelOrder
No
,
status
:
baiduIcpStatus
[
res
.
data
.
deliveryContent
.
ApplicationStatus
],
};
//提交沟通记录
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
reqbody
:
pushObj
});
//推送状态变更
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
console
.
log
(
"nc tongzhi++pushObj+++"
,
pushObj
)
console
.
log
(
"nc tongzhi+++rrr"
,
r
)
}
console
.
log
(
'nc 提交沟通记录r++'
,
r
)
return
system
.
getResultSuccess
();
}
return
res
;
}
//查看沟通记录 2020-11-11 laolan
async
ncGetCommunicationRecord
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
console
.
log
(
'nc 查看沟通记录res-----'
,
res
)
if
(
res
&&
res
.
data
&&
res
.
status
==
0
){
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
var
pushObj
=
{
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
,
};
//查看沟通记录
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
reqbody
:
pushObj
});
if
(
r
&&
r
.
data
&&
r
.
data
.
data
){
var
len
=
r
.
data
.
data
.
length
;
for
(
var
i
=
0
;
i
<
len
;
i
++
){
r
.
data
.
data
[
i
].
createTime
=
r
.
data
.
data
[
i
].
createTime
/
1000
}
}
console
.
log
(
'nc 查看沟通记录++'
,
r
)
}
return
system
.
getResultSuccess
(
r
);
}
}
//关闭需求 2020-11-11 laolan
async
ncCloseNeed
(
pobj
)
{
pobj
.
actionBody
.
intentionBizId
=
pobj
.
actionBody
.
channelNeedNo
;
console
.
log
(
"关闭需求+++"
,
pobj
)
pobj
.
actionType
=
"ncClosePlan"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'nc 关闭需求result-----'
,
result
)
if
(
result
.
status
==
0
)
{
if
(
result
.
data
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
;
var
orderrtn
=
await
this
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
if
(
result
.
data
&&
result
.
data
.
orderNo
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
.
orderNo
;
var
orderrtn
=
await
this
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
console
.
log
(
"orderrtn +++ +++ ++"
,
orderrtn
)
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
}
//推送交付系统
...
...
@@ -337,67 +236,22 @@ class NcService extends AppServiceBase {
resultInfo
:
""
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
res
ult
.
data
.
uapp_id
==
uappId
.
baidu
){
// 推送baidu
var
pushObj
=
{
intentionBiz
Id
:
pobj
.
actionBody
.
needNo
,
bizType
:
pobj
.
actionBody
.
bizType
,
requirement
Id
:
pobj
.
actionBody
.
needNo
,
status
:
"CLOSED"
,
note
:
pobj
.
actionBody
.
note
}
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
pushObj
});
console
.
log
(
'nc closeNeed+++'
,
r
)
var
a
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/requirement/update"
,
reqbody
:
pushObj
});
console
.
log
(
'nc closeNeed+++'
,
a
)
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushClose
Nc
Need"
);
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushClose
ICP
Need"
);
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResult
(
null
,
"close fail 100389 "
);
}
}
//服务商方案关闭 2020-11-11 laolan
async
ncClosePlan
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
var
pushObj
=
{
bizId
:
ab
.
bizId
,
note
:
ab
.
note
};
//关闭方案
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
reqbody
:
pushObj
});
console
.
log
(
'nc cloesePlan r+++'
,
r
)
}
return
system
.
getResultSuccess
();
}
return
res
;
}
//交付单关闭 2020-11-11 laolan
async
ncCloseOrderDelivery
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
var
pushObj
=
{
bizId
:
needsolution
.
channelSolutionNo
,
note
:
ab
.
note
};
//关闭方案
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"///"
,
reqbody
:
pushObj
});
console
.
log
(
'nc交付单关闭+++'
,
r
)
}
return
system
.
getResultSuccess
();
}
return
res
;
}
}
module
.
exports
=
NcService
;
\ No newline at end of file
center-channel/app/base/service/impl/common/rtSve.js
View file @
a9b342f5
const
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
{
getResultSuccess
}
=
require
(
"../../../system"
);
//区分渠道的uappid
const
uappId
=
{
'ali'
:
"18"
,
//(阿里
icp、edi
)
'baidu'
:
"44"
//(百度
icp、edi
)
'ali'
:
"18"
,
//(阿里)
'baidu'
:
"44"
//(百度)
}
//推送百度城市拼音转义 2020-11-6
const
cityLetter
=
{
"北京"
:
"BEIJING"
,
"上海"
:
"SHANGHAI"
,
"福建"
:
"FUJIAN"
,
"广西"
:
"GUANGXI"
,
"广东"
:
"GUANGDONG"
,
"安徽"
:
"ANHUI"
,
"河南"
:
"HENAN"
,
"湖北"
:
"HUBEI"
,
"浙江"
:
"ZHEJIANG"
,
"江苏"
:
"JIANGSU"
,
"山东"
:
"SHANDONG"
,
"陕西"
:
"SHANXI_SHAN"
,
"宁夏"
:
"NINGXIA"
,
"甘肃"
:
"GANSU"
,
"新疆"
:
"XINJIANG"
,
"青海"
:
"QINGHAI"
,
"天津"
:
"TIANJIN"
,
"重庆"
:
"CHONGQING"
,
"河北"
:
"HEBEI"
,
"山西"
:
"SHANXI_JIN"
,
"辽宁"
:
"LIAONING"
,
"吉林"
:
"JILIN"
,
"黑龙江"
:
"HEILONGJIANG"
,
"江西"
:
"JIANGXI"
,
"湖南"
:
"HUNAN"
,
"四川"
:
"SUCHUAN"
,
"贵州"
:
"GUIZHOU"
,
"云南"
:
"YUANNAN"
,
"内蒙古"
:
"NEIMENGGU"
,
"西藏"
:
"XIZANG"
,
"外资"
:
"WAIZI"
,
"海南"
:
"HAINAN"
"四川"
:
"SICHUAN"
,
"广州"
:
"GUANGZHOU"
,
"深圳"
:
"SHENZHEN"
,
}
//百度拼音转义 2020-11-11 laolan
...
...
@@ -52,8 +26,16 @@ const baiduIcpStatus = {
511
:
"APPROVED"
,
512
:
"NOT_APPROVED"
};
const
baiduActionType
=
{
"新办"
:
"NEW"
}
// const baiduLicenseType = {
// "动漫" : "COMIC",
// "音乐" : "MUSIC"
// }
/**
*
广电
相关接口(RT)
* 相关接口(RT)
*/
class
RtService
extends
AppServiceBase
{
constructor
()
{
...
...
@@ -79,95 +61,51 @@ class RtService extends AppServiceBase {
}
//查询需求列表 2020-11-11 laolan
async
rtGetNeedList
(
pobj
){
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
var
pushObj
=
{
type
:
res
.
data
.
type
,
begin
:
res
.
data
.
begin
||
""
,
end
:
res
.
data
.
end
||
""
,
intentionBizId
:
res
.
data
.
intentionBizId
,
status
:
res
.
data
.
status
,
area
:
res
.
data
.
area
,
pagreSize
:
res
.
data
.
pagreSize
||
10
,
pageNum
:
res
.
data
.
pageNum
||
1
}
//查询需求列表
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
reqbody
:
pushObj
});
console
.
log
(
'rt rrrr+++++'
,
r
)
}
return
getResultSuccess
();
}
return
res
}
//交付材料提交 2020-11-11 laolan
async
rtSubmitMaterial
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
var
material
=
ab
.
material
;
console
.
log
(
"cailiao ab+++++"
,
ab
)
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
var
bizId
=
needsolution
.
orderChannelNo
;
console
.
log
(
'
rt
bizId++'
,
bizId
)
console
.
log
(
'bizId++'
,
bizId
)
var
pushObj
=
{
"orderNo"
:
bizId
,
"type"
:
res
.
data
.
productType
,
"businessLicense"
:
{
"name"
:
material
.
businessLicense
.
name
||
""
,
"type"
:
material
.
businessLicense
.
type
||
""
,
"address"
:
material
.
businessLicense
.
address
||
""
,
"createdAt"
:
material
.
businessLicense
.
createdAt
||
""
,
"businessTerm"
:
material
.
businessLicense
.
businessTerm
||
""
,
"scopeBusiness"
:
material
.
businessLicense
.
scopeBusiness
||
""
,
"enterpriseCode"
:
material
.
businessLicense
.
enterpriseCode
||
""
,
"registeredCapital"
:
material
.
businessLicense
.
registeredCapital
||
""
,
"legalRepresentative"
:
material
.
businessLicense
.
legalRepresentative
||
""
,
"name"
:
ab
.
material
.
businessLicense
.
name
||
""
,
"type"
:
ab
.
material
.
businessLicense
.
type
||
""
,
"address"
:
ab
.
material
.
businessLicense
.
address
||
""
,
"createdAt"
:
ab
.
material
.
businessLicense
.
createdAt
||
""
,
"businessTerm"
:
ab
.
material
.
businessLicense
.
businessTerm
||
""
,
"scopeBusiness"
:
ab
.
material
.
businessLicense
.
scopeBusiness
||
""
,
"enterpriseCode"
:
ab
.
material
.
businessLicense
.
enterpriseCode
||
""
,
"registeredCapital"
:
ab
.
material
.
businessLicense
.
registeredCapital
||
""
,
"legalRepresentative"
:
ab
.
material
.
businessLicense
.
legalRepresentative
||
""
,
},
"partnerBusinessLicense"
:
material
.
partnerBusinessLicense
||
""
,
"legalPersonIdentityCard"
:
material
.
legalPersonIdentityCard
||
""
,
"administrativeLicenseAuthorization"
:
material
.
administrativeLicenseAuthorization
||
""
,
"companyPolicy"
:
material
.
companyPolicy
||
""
,
"mainManagement"
:
material
.
mainManagement
||
""
,
"radioAndTelevisionQualifications"
:
material
.
radioAndTelevisionQualifications
||
""
,
"registeredAddressCertificateDocument"
:
material
.
registeredAddressCertificateDocument
||
""
,
"partnerOtherList"
:
material
.
partnerOtherList
||
""
"material"
:{
"partnerBusinessLicense"
:
ab
.
material
.
partnerBusinessLicense
||
""
,
"legalPersonIdentityCard"
:
ab
.
material
.
legalPersonIdentityCard
||
""
,
"businessDevelopmentDescription"
:
ab
.
material
.
businessDevelopmentDescription
||
""
,
"companyPolicy"
:
ab
.
material
.
companyPolicy
||
""
,
"mainManagement"
:
ab
.
material
.
mainManagement
||
""
,
"creditCertificateDocument"
:
ab
.
material
.
creditCertificateDocument
||
""
,
"registeredAddressCertificateDocument"
:
ab
.
material
.
registeredAddressCertificateDocument
||
""
,
"partnerOtherList"
:
ab
.
material
.
partnerOtherList
||
""
}
};
//推送方案材料
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material"
,
reqbody
:
pushObj
});
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material?NC_RT="
,
reqbody
:
pushObj
});
console
.
log
(
'tttttttttttt++++'
,
pushObj
)
console
.
log
(
'rt rrrr+++++'
,
r
)
}
return
system
.
getResultSuccess
();
}
return
res
;
}
//通知交付状态变更 2020-11-11 laolan
async
rtNotification
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
res
.
data
.
applicationStatus
=
baiduIcpStatus
[
res
.
data
.
applicationStatus
];
console
.
log
(
'rt res.data.channelOrderNo+++'
,
res
.
data
.
channelOrderNo
)
//推送数据至百度
var
pushObj
=
{
orderNo
:
res
.
data
.
channelOrderNo
,
status
:
res
.
data
.
applicationStatus
,
};
//推送状态变更
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
console
(
"rt tongzhi+++"
,
r
)
}
return
system
.
getResultSuccess
();
}
return
res
;
}
//提交方案 2020-11-11 laolan
async
rtSubmitSolution
(
pobj
)
{
...
...
@@ -176,11 +114,7 @@ class RtService extends AppServiceBase {
console
.
log
(
'rt+++res'
,
res
)
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
console
.
log
(
'rt solutionContent+++'
,
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
reqParams
=
{
...
...
@@ -198,18 +132,20 @@ class RtService extends AppServiceBase {
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/common/
rtSve.js/rt
SubmitSolution"
,
op
:
"service/impl/common/
ncSve.js/nc
SubmitSolution"
,
content
:
JSON
.
stringify
(
reqParams
),
resultInfo
:
""
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
res
.
data
.
needinfo
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
var
pushObj
=
{
intentionBizId
:
res
.
data
.
needinfo
.
channelNeedNo
,
bizType
:
res
.
data
.
needinfo
.
channelTypeCode
,
// solution: res.data.needsolution.solutionContent
solution
:
solution
requirementId
:
pobj
.
actionBody
.
needNo
,
companyName
:
pobj
.
actionBody
.
solutionContent
.
solution
.
CompanyName
,
// subType: baiduLicenseType[pobj.actionBody.solutionContent.solution.LicenseType],
area
:
cityLetter
[
pobj
.
actionBody
.
solutionContent
.
solution
.
Area
],
type
:
pobj
.
actionBody
.
solutionContent
.
solution
.
IcpType
,
actionType
:
baiduActionType
[
pobj
.
actionBody
.
solutionContent
.
solution
.
ActionType
]
};
console
.
log
(
"rt pushObj+++"
,
pushObj
);
var
r
=
await
this
.
pushBaiduRtSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
...
...
@@ -222,9 +158,9 @@ class RtService extends AppServiceBase {
//推送方案baidu 2020-11-11 laolan
async
pushBaiduRtSubmitSolution
(
pushObj
,
solutionNo
,
appInfo
,
self
)
{
//推送
状态变更
var
pushRes
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"///
"
,
reqbody
:
pushObj
});
console
.
log
(
'
rt
++++pushRes'
,
pushRes
)
//推送
提交方案baidu
var
pushRes
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/plan
"
,
reqbody
:
pushObj
});
console
.
log
(
'
baidu nc
++++pushRes'
,
pushRes
)
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
var
resData
=
pushRes
.
data
;
var
reqObj2
=
{
...
...
@@ -232,88 +168,55 @@ class RtService extends AppServiceBase {
appInfo
:
appInfo
,
actionBody
:
{
solutionNo
:
solutionNo
,
solutionBizId
:
resData
.
SolutionBiz
Id
solutionBizId
:
resData
.
plan
Id
}
};
console
.
log
(
'zhuangtai reqObj2++++'
,
reqObj2
)
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
console
.
log
(
"zhuangtai a++++"
,
a
)
return
a
;
}
}
//提交沟通记录 2020-11-11 laolan
async
rtWriteCommunicationRecord
(
pobj
)
{
console
.
log
(
'rt 提交沟通记录pobj'
,
pobj
)
//通知交付状态变更 2020-11-11 laolan
async
rtNotification
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
console
.
log
(
'rt 提交沟通记录res'
,
res
)
if
(
res
&&
res
.
data
&&
res
.
status
==
0
){
//推送交付系统
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
status
:
"followingUp"
},
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
var
push
=
await
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
if
(
push
&&
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
console
.
log
(
"rt tongzhi++res+++"
,
res
)
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
console
.
log
(
'rt res.data.channelOrderNo'
,
res
.
data
.
channelOrderNo
)
//推送数据至百度
var
pushObj
=
{
intentionBizId
:
pobj
.
actionBody
.
need
No
,
note
:
pobj
.
actionBody
.
note
orderNo
:
res
.
data
.
channelOrder
No
,
status
:
baiduIcpStatus
[
res
.
data
.
deliveryContent
.
ApplicationStatus
],
};
//提交沟通记录
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
reqbody
:
pushObj
});
//推送状态变更
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/update"
,
reqbody
:
pushObj
});
console
.
log
(
"rt tongzhi++pushObj+++"
,
pushObj
)
console
.
log
(
"rt tongzhi+++rrr"
,
r
)
}
console
.
log
(
'rt 提交沟通记录r++'
,
r
)
return
system
.
getResultSuccess
();
}
}
//查看沟通记录 2020-11-11 laolan
async
rtGetCommunicationRecord
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
console
.
log
(
'rt 查看沟通记录res-----'
,
res
)
if
(
res
&&
res
.
data
&&
res
.
status
==
0
){
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
var
pushObj
=
{
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
,
};
//查看沟通记录
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
reqbody
:
pushObj
});
if
(
r
&&
r
.
data
&&
r
.
data
.
data
){
var
len
=
r
.
data
.
data
.
length
;
for
(
var
i
=
0
;
i
<
len
;
i
++
){
r
.
data
.
data
[
i
].
createTime
=
r
.
data
.
data
[
i
].
createTime
/
1000
}
}
console
.
log
(
'rt 查看沟通记录++'
,
r
)
}
return
system
.
getResultSuccess
(
r
);
}
return
res
;
}
//关闭需求 2020-11-11 laolan
async
rtCloseNeed
(
pobj
)
{
pobj
.
actionBody
.
intentionBizId
=
pobj
.
actionBody
.
channelNeedNo
;
console
.
log
(
"关闭需求+++"
,
pobj
)
pobj
.
actionType
=
"rtClosePlan"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'rt 关闭需求result-----'
,
result
)
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
,
"订单关闭失败"
);
}
if
(
result
.
data
&&
result
.
data
.
orderNo
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
.
orderNo
;
var
orderrtn
=
await
this
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
console
.
log
(
"orderrtn +++ +++ ++"
,
orderrtn
)
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
}
//推送交付系统
...
...
@@ -331,72 +234,27 @@ class RtService extends AppServiceBase {
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/impl/common/
rtSve.js/rt
CloseNeed"
,
op
:
"service/impl/common/
ncSve.js/nc
CloseNeed"
,
content
:
JSON
.
stringify
(
reqParams
),
resultInfo
:
""
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
res
ult
.
data
.
uapp_id
==
uappId
.
baidu
){
// 推送baidu
var
pushObj
=
{
intentionBiz
Id
:
pobj
.
actionBody
.
needNo
,
bizType
:
pobj
.
actionBody
.
bizType
,
requirement
Id
:
pobj
.
actionBody
.
needNo
,
status
:
"CLOSED"
,
note
:
pobj
.
actionBody
.
note
}
var
a
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/
///"
,
pushObj
});
var
a
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/
api/bla/provider/requirement/update"
,
reqbody
:
pushObj
});
console
.
log
(
'rt closeNeed+++'
,
a
)
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushClose
Rt
Need"
);
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushClose
ICP
Need"
);
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResult
(
null
,
"close fail 100389 "
);
}
}
//服务商方案关闭 2020-11-11 laolan
async
rtClosePlan
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
typeof
(
ab
.
material
)
==
"string"
)
{
ab
.
material
=
JSON
.
parse
(
ab
.
material
);
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
var
pushObj
=
{
bizId
:
ab
.
bizId
,
note
:
ab
.
note
};
//关闭方案
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"////"
,
reqbody
:
pushObj
});
console
.
log
(
'rt closePlan +++'
,
r
)
}
return
system
.
getResultSuccess
();
}
return
res
;
}
//交付单关闭 2020-11-11 laolan
async
rtCloseOrderDelivery
(
pobj
)
{
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
var
needsolution
=
res
.
data
;
//方案信息
var
ab
=
pobj
.
actionBody
;
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
var
pushObj
=
{
bizId
:
needsolution
.
channelSolutionNo
,
note
:
ab
.
note
};
//关闭方案
var
r
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"///"
,
reqbody
:
pushObj
});
console
.
log
(
'rt 交付单关闭+++'
,
r
)
}
return
system
.
getResultSuccess
();
}
return
res
;
}
}
module
.
exports
=
RtService
;
\ No newline at end of file
center-channel/app/base/service/impl/common/signSve.js
View file @
a9b342f5
...
...
@@ -113,13 +113,36 @@ class SignService{
}
}
module
.
exports
=
SignService
;
// var task = new SignService();
// var task = new SignService();
// var obj = {
// "intentionBizId": "TRE-vLTWoPv99nfceshishuju2",
// "description": "测试用户关闭2",
// "intentionStatus": 5
// };
// "actionType": "serviceProviderSubmitMaterial",
// "actionBody": {
// "uapp_id":44,
// "isTest":1,
// "orderNo":"OT442020112419480gtI",
// "material":{
// "BusinessLicense":{
// "Address":"x",
// "BusinessTerm":"x-x",
// "CreatedAt":"2020-11-17",
// "EnterpriseCode":"x",
// "LegalRepresentative":"x",
// "Name":"测试 百度渠道",
// "RegisteredCapital":"10",
// "ScopeBusiness":"x",
// "Type":"x"
// },
// "Domain":"x.com",
// "CorporateName":"x",
// "IncludeForeignInvestment":true,
// "PartnerBusinessLicense":"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_3610160464935869220206155558692.jpeg",
// "PartnerIdCardList":["https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_463101604649363092202061556392.jpeg"],
// "PartnerDomainCertificate":"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_4481016046493695182020615569518.jpeg",
// "PartnerPreviewOtherList":["https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_24710160464940618020206155646180.zip"]
// }
// }
// }
// task.createSign(obj,"7cbb892450174167b5c7e01we4716t51").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// });
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
View file @
a9b342f5
...
...
@@ -511,7 +511,7 @@ class UtilsNeedService2 extends AppServiceBase {
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
//2020-10-28 laolan start
if
(
result
&&
result
.
status
==
0
&&
result
.
data
)
{
if
(
result
.
data
==
uappId
.
ali
ConfirmResult
)
{
if
(
result
.
data
==
uappId
.
ali
)
{
var
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"writeCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
"ali+res"
,
res
)
}
...
...
@@ -544,14 +544,8 @@ class UtilsNeedService2 extends AppServiceBase {
return
system
.
getResultSuccess
();
}
//2020-10-28 laolan start
async
queryExpertApplyCommunicationLogs
(
pobj
)
{
// if (!pobj.actionBody.intentionBizId) {
// return system.getResult(null, "actionBody.intentionBizId can not be empty,100493");
// }
// if (!pobj.actionBody.userFeedBack) {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// }
//2020-10-28 laolan start
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'jilu+++result++++'
,
result
)
...
...
@@ -582,16 +576,6 @@ class UtilsNeedService2 extends AppServiceBase {
}
}
// 2020 0820 lin 新增 拉去有跟进信息的需求但 并 记录
// console.log(pobj.actionBody.intentionBizId,res.data.TotalItemNum)
// if(res.data.TotalItemNum > 0) {
// var sql = "update testneed set status=1 where channelNeedNo=:channelNeedNo"
// var paramWhere = {
// channelNeedNo: pobj.actionBody.intentionBizId
// };
// var updateRes = await this.utilsneedSve.dao.customUpdate(sql, paramWhere);
// }
// func();
if
(
res
&&
res
.
data
&&
res
.
data
.
result
){
res
.
data
[
'Data'
]
=
res
.
data
.
result
}
...
...
center-channel/app/base/utils/baiduClient.js
View file @
a9b342f5
...
...
@@ -24,7 +24,15 @@ class baiduClient {
let
extime
=
1800
;
let
canonicalHeaders
=
"host:"
+
this
.
baiduClientParams
.
host
;
//中间结果1:规范化请求和前缀字符串
let
canonicalRequest
=
"POST"
+
"
\
n"
+
path
+
"
\
n"
+
"
\
n"
+
canonicalHeaders
;
var
canonicalRequest
=
null
var
pathParams
=
path
.
split
(
"?"
);
if
(
pathParams
&&
pathParams
.
length
>
1
){
canonicalRequest
=
"POST"
+
"
\
n"
+
pathParams
[
0
]
+
"
\
n"
+
pathParams
[
1
]
+
"
\
n"
+
canonicalHeaders
;
}
else
{
canonicalRequest
=
"POST"
+
"
\
n"
+
path
+
"
\
n"
+
"
\
n"
+
canonicalHeaders
;
}
// let canonicalRequest = "POST" + "\n" + path + "\n" + "\n" + canonicalHeaders;
console
.
log
(
'canonicalRequest+++++++'
,
canonicalRequest
)
//authStringPrefix(前缀字符串,由除sk字段外的签名信息生成)
let
authStringPrefix
=
version
+
"/"
+
accessKey
+
"/"
+
timestamp
+
"/"
+
extime
;
//中间结果2:派生签名密钥 signingKey
...
...
center-channel/app/config/businessConfig.js
View file @
a9b342f5
...
...
@@ -14,8 +14,8 @@ module.exports = {
"orderTotalSum"
,
"collect"
,
"reg"
,
"orderCheck"
,
"getReOrderList"
,
"getOfficalList"
,
"addReviewList"
,
"opSubmitNeed"
,
"opNeedClose"
,
"opNeedList"
,
"getItemByNeedNo"
,
"opNeedDetailByChannelNo"
,
"getNeedListUser"
,
"manualEvaluation"
,
"diagnosisInfo"
,
"check"
,
"enterpriseInfo"
,
"diagnosisDetail"
,
"submitIcpIntention"
,
"queryIntentionList"
,
"confirmIcpIntention"
,
"tmAccept"
,
"tmStatus"
,
"needBatchUpload"
,
"ncSubmitMaterial"
,
"ncNotification"
,
"ncSubmitSolution"
,
"nc
WriteCommunicationRecord"
,
"ncGetCommunicationRecord"
,
"ncCloseNeed"
,
"ncClosePlan"
,
"ncCloseOrderDelivery
"
,
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rt
WriteCommunicationRecord"
,
"rtGetCommunicationRecord"
,
"rtCloseNeed"
,
"rtClosePlan"
,
"rtCloseOrderDelivery
"
,
"ncSubmitMaterial"
,
"ncNotification"
,
"ncSubmitSolution"
,
"nc
CloseNeed"
,
"ncClosePlan
"
,
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rt
CloseNeed"
,
"rtClosePlan
"
,
"getParamsFor360"
,
"addOrderWeb"
,
"getPayRecords"
,
"getLoginInfo"
,
"putUserMobileByVcode"
,
"putUserPwdByMobile"
,
"icpNotifyNew"
],
...
...
@@ -23,8 +23,8 @@ module.exports = {
"icpOrderClose"
,
"submitNeed"
,
"paySuccess"
,
"icpNotify"
,
"getLoginInfo"
,
"icpNotifyNew"
,
"submitIcpProgramme"
,
"serviceProviderSubmitMaterial"
,
"abolishIcpProgramme"
,
"submitService"
,
"serviceProviderNotification"
,
"nc
GetNeedList"
,
"ncSubmitMaterial"
,
"ncNotification"
,
"ncSubmitSolution"
,
"ncWriteCommunicationRecord"
,
"ncGetCommunicationRecord"
,
"ncCloseNeed"
,
"ncClosePlan"
,
"ncCloseOrderDelivery
"
,
"rt
GetNeedList"
,
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rtWriteCommunicationRecord"
,
"rtGetCommunicationRecord"
,
"rtCloseNeed"
,
"rtClosePlan"
,
"rtCloseOrderDelivery
"
,
"nc
SubmitMaterial"
,
"ncNotification"
,
"ncSubmitSolution"
,
"ncCloseNeed"
,
"ncClosePlan
"
,
"rt
SubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rtCloseNeed"
,
"rtClosePlan
"
,
],
apiSecretPathList
:
[
"/api/icp/consultation/submit"
,
"/api/icp/feedback/submit"
,
"/api/icp/order/notify"
,
"/api/opreceive/service/create"
,
"/api/icp/order/close"
,
"/api/opreceive/service/notify"
,
"/api/icp/queueNotify/springBoard"
,]
}
...
...
center-channel/app/config/localsettings.js
View file @
a9b342f5
var
settings
=
{
redis
:
{
host
:
"
121.36.3.35
"
,
port
:
8967
,
password
:
"
Gongsibao2018
"
,
host
:
"
39.107.234.14
"
,
port
:
6379
,
password
:
"
123123
"
,
db
:
4
,
},
database
:
{
...
...
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