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
40b40292
Commit
40b40292
authored
Nov 07, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of
http://gitlab.gongsibao.com/jiangyong/zhichan
into center-channel
parents
d0159cc4
3c1e4e62
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
287 additions
and
345 deletions
+287
-345
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+71
-47
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+192
-192
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
+16
-16
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
+4
-3
center-channel/app/base/utils/baiduClient.js
+3
-86
center-channel/app/config/businessConfig.js
+1
-1
No files found.
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
View file @
40b40292
...
@@ -17,42 +17,51 @@ const uappId = {
...
@@ -17,42 +17,51 @@ const uappId = {
'ali'
:
"18"
,
//(阿里icp、edi)
'ali'
:
"18"
,
//(阿里icp、edi)
'baidu'
:
"44"
//(百度icp、edi)
'baidu'
:
"44"
//(百度icp、edi)
}
}
const
city
=
{
//tui song baidu zhuanyong pinyin 2020-11-6
"1"
:
"北京"
,
const
cityLetter
=
{
"2"
:
"上海"
,
"北京"
:
"BEIJING"
,
"3"
:
"福建"
,
"上海"
:
"SHANGHAI"
,
"4"
:
"广西"
,
"福建"
:
"FUJIAN"
,
"5"
:
"广东"
,
"广西"
:
"GUANGXI"
,
"6"
:
"安徽"
,
"广东"
:
"GUANGDONG"
,
"7"
:
"河南"
,
"安徽"
:
"ANHUI"
,
"8"
:
"湖北"
,
"河南"
:
"HENAN"
,
"9"
:
"浙江"
,
"湖北"
:
"HUBEI"
,
"10"
:
"江苏"
,
"浙江"
:
"ZHEJIANG"
,
"11"
:
"山东"
,
"江苏"
:
"JIANGSU"
,
"12"
:
"陕西"
,
"山东"
:
"SHANDONG"
,
"13"
:
"宁夏"
,
"陕西"
:
"SHANXI_SHAN"
,
"14"
:
"甘肃"
,
"宁夏"
:
"NINGXIA"
,
"15"
:
"新疆"
,
"甘肃"
:
"GANSU"
,
"16"
:
"青海"
,
"新疆"
:
"XINJIANG"
,
"17"
:
"天津"
,
"青海"
:
"QINGHAI"
,
"18"
:
"重庆"
,
"天津"
:
"TIANJIN"
,
"19"
:
"河北"
,
"重庆"
:
"CHONGQING"
,
"20"
:
"山西"
,
"河北"
:
"HEBEI"
,
"21"
:
"辽宁"
,
"山西"
:
"SHANXI_JIN"
,
"22"
:
"吉林"
,
"辽宁"
:
"LIAONING"
,
"23"
:
"黑龙江"
,
"吉林"
:
"JILIN"
,
"24"
:
"江西"
,
"黑龙江"
:
"HEILONGJIANG"
,
"25"
:
"湖南"
,
"江西"
:
"JIANGXI"
,
"26"
:
"四川"
,
"湖南"
:
"HUNAN"
,
"27"
:
"贵州"
,
"四川"
:
"SUCHUAN"
,
"28"
:
"云南"
,
"贵州"
:
"GUIZHOU"
,
"29"
:
"内蒙古"
,
"云南"
:
"YUANNAN"
,
"30"
:
"西藏"
,
"内蒙古"
:
"NEIMENGGU"
,
"31"
:
"含外资"
,
"西藏"
:
"XIZANG"
,
"32"
:
"全外资"
,
"外资"
:
"WAIZI"
,
"33"
:
"香港"
,
"海南"
:
"HAINAN"
"34"
:
"海南"
}
}
//baidu pinyinzhuanyong 2020-11-6
const
baiduIcpStatus
=
{
507
:
"REGISTRATION"
,
508
:
"SUBMITTED"
,
509
:
"ACCEPTED"
,
510
:
"NOT_ACCEPTED"
,
511
:
"APPROVED"
,
512
:
"NOT_APPROVED"
};
/**
/**
* 资质信息提报相关接口(ICP\EDI)
* 资质信息提报相关接口(ICP\EDI)
*/
*/
...
@@ -122,6 +131,8 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -122,6 +131,8 @@ class BaseCenterOrderService extends AppServiceBase {
if
(
needinfo
.
uapp_id
==
uappId
.
baidu
){
if
(
needinfo
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
//推送数据至baidu
// var bizType = needinfo.channelTypeCode;//业务类型里
// var bizType = needinfo.channelTypeCode;//业务类型里
solution
.
Area
=
cityLetter
[
solution
.
Area
]
console
.
log
(
'solution.Area++'
,
solution
.
Area
)
var
pushObj
=
{
var
pushObj
=
{
requirementId
:
needinfo
.
channelNeedNo
,
requirementId
:
needinfo
.
channelNeedNo
,
companyName
:
solution
.
CompanyName
,
companyName
:
solution
.
CompanyName
,
...
@@ -219,17 +230,17 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -219,17 +230,17 @@ class BaseCenterOrderService extends AppServiceBase {
console
.
log
(
"pushRes++++"
,
pushRes
)
console
.
log
(
"pushRes++++"
,
pushRes
)
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
var
resData
=
pushRes
.
data
;
var
resData
=
pushRes
.
data
;
if
(
resData
.
bizId
)
{
if
(
resData
.
result
)
{
var
reqObj2
=
{
var
reqObj2
=
{
actionType
:
"receiveProgrammeNo"
,
actionType
:
"receiveProgrammeNo"
,
appInfo
:
appInfo
,
appInfo
:
appInfo
,
actionBody
:
{
actionBody
:
{
solutionNo
:
solutionNo
,
solutionNo
:
solutionNo
,
solutionBizId
:
resData
.
bizId
solutionBizId
:
resData
.
result
}
}
};
};
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj2
);
//保存渠道方案id
return
system
.
getResultSuccess
()
;
return
pushRes
;
}
}
}
}
}
}
...
@@ -290,9 +301,22 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -290,9 +301,22 @@ class BaseCenterOrderService extends AppServiceBase {
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
//推送数据至百度
//推送数据至百度
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
var
BizId
=
needsolution
.
orderChannelNo
;
console
.
log
(
'BizId++'
,
BizId
)
var
pushObj
=
{
var
pushObj
=
{
"bizId"
:
BizId
,
"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
,
"domain"
:
material
.
Domain
,
"corporateName"
:
material
.
CorporateName
,
"corporateName"
:
material
.
CorporateName
,
"includeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
"includeForeignInvestment"
:
material
.
IncludeForeignInvestment
,
...
@@ -301,7 +325,6 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -301,7 +325,6 @@ class BaseCenterOrderService extends AppServiceBase {
"partnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"partnerDomainCertificate"
:
material
.
PartnerDomainCertificate
,
"partnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"partnerPreviewOtherList"
:
material
.
PartnerPreviewOtherList
||
[],
"partnerPlan"
:
material
.
PartnerPlan
||
""
,
"partnerPlan"
:
material
.
PartnerPlan
||
""
,
"partnerForeignInvestment"
:
material
.
PartnerForeignInvestment
||
""
,
"partnerLaw"
:
material
.
PartnerLaw
||
""
,
"partnerLaw"
:
material
.
PartnerLaw
||
""
,
"partnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"partnerStampOtherList"
:
material
.
PartnerStampOtherList
||
[],
"partnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
"partnerSignOtherList"
:
material
.
PartnerSignOtherList
||
[],
...
@@ -309,8 +332,8 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -309,8 +332,8 @@ class BaseCenterOrderService extends AppServiceBase {
};
};
var
self
=
this
;
var
self
=
this
;
//推送方案材料
//推送方案材料
var
r
=
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material"
,
reqbody
:
pushObj
});
var
r
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/license/material"
,
reqbody
:
pushObj
});
console
.
log
(
"r++"
,
res
)
console
.
log
(
'rrrr+++++'
,
r
)
}
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
...
@@ -332,14 +355,15 @@ class BaseCenterOrderService extends AppServiceBase {
...
@@ -332,14 +355,15 @@ class BaseCenterOrderService extends AppServiceBase {
}
}
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
res
.
data
.
uapp_id
==
uappId
.
baidu
){
res
.
data
.
ApplicationStatus
=
baiduIcpStatus
[
res
.
data
.
ApplicationStatus
];
console
.
log
(
'res.data.channelOrderNo'
,
res
.
data
.
channelOrderNo
)
//推送数据至百度
//推送数据至百度
var
pushObj
=
{
var
pushObj
=
{
bizId
:
res
.
data
.
BizId
,
orderNo
:
res
.
data
.
channelOrderNo
,
officialFileURL
:
res
.
data
.
OfficialFileURL
,
status
:
res
.
data
.
ApplicationStatus
applicationStatus
:
res
.
data
.
ApplicationStatus
};
};
//推送状态变更
//推送状态变更
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/
requirement
/update"
,
reqbody
:
pushObj
});
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/
license
/update"
,
reqbody
:
pushObj
});
}
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
...
...
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
40b40292
...
@@ -27,7 +27,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -27,7 +27,7 @@ class QcCenterOrderService extends AppServiceBase {
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsTmAliyunSve
=
system
.
getObject
(
"service.utilsSve.utilsTmAliyunSve"
);
//测试用
this
.
utilsTmAliyunSve
=
system
.
getObject
(
"service.utilsSve.utilsTmAliyunSve"
);
//测试用
this
.
opPushQueueUrl
=
settings
.
opPushQueueUrl
();
this
.
opPushQueueUrl
=
settings
.
opPushQueueUrl
();
};
};
//调用center-order
//调用center-order
async
reqCenterOrderApi
(
pobj
,
reqUrl
)
{
async
reqCenterOrderApi
(
pobj
,
reqUrl
)
{
...
@@ -60,8 +60,8 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -60,8 +60,8 @@ class QcCenterOrderService extends AppServiceBase {
IntentionBizId
:
needinfo
.
channelNeedNo
,
IntentionBizId
:
needinfo
.
channelNeedNo
,
CompanyName
:
solution
.
CompanyName
,
IcpType
:
solution
.
IcpType
,
CompanyAddress
:
solution
.
CompanyAddress
,
CompanyName
:
solution
.
CompanyName
,
IcpType
:
solution
.
IcpType
,
CompanyAddress
:
solution
.
CompanyAddress
,
Area
:
solution
.
Area
,
Note
:
solution
.
Note
,
Area
:
solution
.
Area
,
Note
:
solution
.
Note
,
ActionType
:
solution
.
actionType
,
ActionType
:
solution
.
actionType
,
Source
:
"官网"
Source
:
"官网"
};
};
if
(
needsolution
.
channelSolutionNo
)
{
if
(
needsolution
.
channelSolutionNo
)
{
pushObj
[
"BizId"
]
=
needsolution
.
channelSolutionNo
;
pushObj
[
"BizId"
]
=
needsolution
.
channelSolutionNo
;
...
@@ -196,7 +196,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -196,7 +196,7 @@ class QcCenterOrderService extends AppServiceBase {
};
};
var
self
=
this
;
var
self
=
this
;
//推送方案材料
//推送方案材料
if
(
pobj
.
appInfo
.
uapp_id
==
18
)
{
if
(
pobj
.
appInfo
.
uapp_id
==
18
)
{
self
.
aliclient
.
reqbyget
({
action
:
"SavePartnerSubmitMaterial"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
self
.
aliclient
.
reqbyget
({
action
:
"SavePartnerSubmitMaterial"
,
reqbody
:
pushObj
,
apiVersion
:
"2019-05-08"
});
}
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
...
@@ -210,20 +210,20 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -210,20 +210,20 @@ class QcCenterOrderService extends AppServiceBase {
pobj
.
actionType
=
"getOrderByOrderNo"
;
pobj
.
actionType
=
"getOrderByOrderNo"
;
let
orderUrl
=
settings
.
centerOrderUrl
()
+
"action/order/springBoard"
;
let
orderUrl
=
settings
.
centerOrderUrl
()
+
"action/order/springBoard"
;
let
orderResult
=
await
this
.
restPostUrl
(
pobj
,
orderUrl
);
let
orderResult
=
await
this
.
restPostUrl
(
pobj
,
orderUrl
);
if
(
orderResult
.
status
!=
0
)
{
if
(
orderResult
.
status
!=
0
)
{
return
system
.
getResultFail
(
-
1
,
'查询订单失败'
)
return
system
.
getResultFail
(
-
1
,
'查询订单失败'
)
}
}
let
uapp_id
=
orderResult
.
data
.
uapp_id
;
let
uapp_id
=
orderResult
.
data
.
uapp_id
;
pobj
.
appInfo
=
{
uapp_id
:
uapp_id
};
pobj
.
appInfo
=
{
uapp_id
:
uapp_id
};
pobj
.
actionType
=
"getAppInterface"
;
pobj
.
actionType
=
"getAppInterface"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
reqUrl
=
settings
.
centerAppUrl
()
+
"action/opProduct/springBoard"
;
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
productItemInterfaceResult
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
if
(
productItemInterfaceResult
.
status
!=
0
)
{
if
(
productItemInterfaceResult
.
status
!=
0
)
{
system
.
getResultFail
(
-
1
,
'获取接口参数失败'
)
system
.
getResultFail
(
-
1
,
'获取接口参数失败'
)
}
}
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
pobj
.
interface_info
=
productItemInterfaceResult
.
data
;
pobj
.
pushObj
=
res
.
data
;
pobj
.
pushObj
=
res
.
data
;
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
'pushStatus'
,
1
);
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
'pushStatus'
,
1
);
//推送数据至阿里
//推送数据至阿里
// var pushObj = {
// var pushObj = {
// BizId: res.data.BizId,
// BizId: res.data.BizId,
...
@@ -253,7 +253,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -253,7 +253,7 @@ class QcCenterOrderService extends AppServiceBase {
return
res
;
return
res
;
}
}
// ----------- 文网文 -----------
// ----------- 文网文 -----------
//服务商提交服务操作(文网文)2020-9-26
//服务商提交服务操作(文网文)2020-9-26
async
serviceSubmitOption
(
pobj
)
{
async
serviceSubmitOption
(
pobj
)
{
...
@@ -265,12 +265,12 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -265,12 +265,12 @@ class QcCenterOrderService extends AppServiceBase {
BizId
:
pobj
.
actionBody
.
orderNo
,
BizId
:
pobj
.
actionBody
.
orderNo
,
BizType
:
pobj
.
actionBody
.
channelType
,
BizType
:
pobj
.
actionBody
.
channelType
,
OperateType
:
wangwenStatusDisct
[
resStatus
],
OperateType
:
wangwenStatusDisct
[
resStatus
],
ExtInfo
:
pobj
.
actionBody
.
extInfo
ExtInfo
:
pobj
.
actionBody
.
extInfo
};
};
console
.
log
(
"fuwu++++pushObj"
,
pushObj
);
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
)
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
return
res
;
return
res
;
...
@@ -278,10 +278,10 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -278,10 +278,10 @@ class QcCenterOrderService extends AppServiceBase {
//提交方案(文网文)2020-9-27
//提交方案(文网文)2020-9-27
async
submitWangwenSolution
(
pobj
)
{
async
submitWangwenSolution
(
pobj
)
{
console
.
log
(
'文网文提交方案'
,
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
);
console
.
log
(
'www'
,
res
.
data
.
needsolution
.
solutionContent
);
var
solution
=
res
.
data
.
needsolution
.
solutionContent
;
var
solution
=
res
.
data
.
needsolution
.
solutionContent
;
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
solution
=
JSON
.
parse
(
solution
);
solution
=
JSON
.
parse
(
solution
);
...
@@ -316,8 +316,8 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -316,8 +316,8 @@ class QcCenterOrderService extends AppServiceBase {
// solution: res.data.needsolution.solutionContent
// solution: res.data.needsolution.solutionContent
solution
:
solution
solution
:
solution
};
};
console
.
log
(
"wangwen"
,
pushObj
);
console
.
log
(
"wangwen"
,
pushObj
);
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
...
@@ -329,7 +329,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -329,7 +329,7 @@ class QcCenterOrderService extends AppServiceBase {
async
pushSubmitSolution
(
pushObj
,
solutionNo
,
appInfo
,
self
)
{
async
pushSubmitSolution
(
pushObj
,
solutionNo
,
appInfo
,
self
)
{
//推送状态变更
//推送状态变更
var
pushRes
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitSolution"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
var
pushRes
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitSolution"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
console
.
log
(
'wangwen++++pushRespushRes'
,
pushRes
)
console
.
log
(
'wangwen++++pushRespushRes'
,
pushRes
)
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
if
(
pushRes
&&
pushRes
.
status
==
0
&&
pushRes
.
data
)
{
var
resData
=
pushRes
.
data
;
var
resData
=
pushRes
.
data
;
var
reqObj2
=
{
var
reqObj2
=
{
...
@@ -359,7 +359,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -359,7 +359,7 @@ class QcCenterOrderService extends AppServiceBase {
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/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
)
console
.
log
(
'www+++result'
,
result
)
if
(
result
.
status
==
0
)
{
if
(
result
.
status
==
0
)
{
if
(
result
.
data
)
{
if
(
result
.
data
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
;
pobj
.
actionBody
.
orderNo
=
result
.
data
;
...
@@ -390,8 +390,8 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -390,8 +390,8 @@ class QcCenterOrderService extends AppServiceBase {
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
});
// 推送ali
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2020-03-06"
});
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2020-03-06"
});
console
.
log
(
'alalallala'
,
a
)
console
.
log
(
'alalallala'
,
a
)
// 2020 1021 lin 新增查看日志
// 2020 1021 lin 新增查看日志
self
.
logCtl
.
info
({
self
.
logCtl
.
info
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
...
@@ -411,7 +411,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -411,7 +411,7 @@ class QcCenterOrderService extends AppServiceBase {
//提交沟通记录
//提交沟通记录
async
recordLog
(
pobj
)
{
async
recordLog
(
pobj
)
{
console
.
log
(
'提交沟通记录pobj'
,
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"
);
...
@@ -422,7 +422,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -422,7 +422,7 @@ class QcCenterOrderService extends AppServiceBase {
var
self
=
this
;
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/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
)
console
.
log
(
'www+提交沟通记录result'
,
result
)
//推送交付系统
//推送交付系统
var
reqParams
=
{
var
reqParams
=
{
actionBody
:
{
actionBody
:
{
...
@@ -441,7 +441,7 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -441,7 +441,7 @@ class QcCenterOrderService extends AppServiceBase {
//提交沟通记录
//提交沟通记录
var
r
=
await
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
)
console
.
log
(
'www+提交沟通记录r'
,
r
)
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
...
@@ -459,10 +459,10 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -459,10 +459,10 @@ 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
)
console
.
log
(
'loglist-----'
,
res
)
if
(
res
&&
res
.
data
&&
res
.
data
.
Data
)
{
if
(
res
&&
res
.
data
&&
res
.
data
.
Data
)
{
var
len
=
res
.
data
.
Data
.
length
;
var
len
=
res
.
data
.
Data
.
length
;
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
res
.
data
.
Data
[
i
].
CreateTime
=
res
.
data
.
Data
[
i
].
CreateTime
/
1000
res
.
data
.
Data
[
i
].
CreateTime
=
res
.
data
.
Data
[
i
].
CreateTime
/
1000
}
}
}
}
...
@@ -470,40 +470,40 @@ class QcCenterOrderService extends AppServiceBase {
...
@@ -470,40 +470,40 @@ class QcCenterOrderService extends AppServiceBase {
}
}
// ----------- 食品 -----------
// ----------- 食品 -----------
//服务商提交服务操作
//服务商提交服务操作
async
foodServiceSubmitOption
(
pobj
)
{
async
foodServiceSubmitOption
(
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
)
{
//推送数据至阿里
//推送数据至阿里
var
resStatus
=
res
.
data
.
ApplicationStatus
;
var
resStatus
=
res
.
data
.
ApplicationStatus
;
var
pushObj
=
{
var
pushObj
=
{
BizId
:
pobj
.
actionBody
.
orderNo
,
BizId
:
pobj
.
actionBody
.
orderNo
,
BizType
:
pobj
.
actionBody
.
channelTpye
,
BizType
:
pobj
.
actionBody
.
channelTpye
,
OperateType
:
wangwenStatusDisct
[
resStatus
],
OperateType
:
wangwenStatusDisct
[
resStatus
],
ExtInfo
:
pobj
.
actionBody
.
extInfo
ExtInfo
:
pobj
.
actionBody
.
extInfo
};
};
//推送状态变更
//推送状态变更
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
)
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
return
res
;
}
}
return
res
;
}
//提交方案
//提交方案
async
submitFoodSolution
(
pobj
)
{
async
submitFoodSolution
(
pobj
)
{
console
.
log
(
'food+++pobj'
,
pobj
)
console
.
log
(
'food+++pobj'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
console
.
log
(
'food+++res'
,
res
)
console
.
log
(
'food+++res'
,
res
)
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
console
.
log
(
'food'
,
res
.
data
.
needsolution
.
solutionContent
);
console
.
log
(
'food'
,
res
.
data
.
needsolution
.
solutionContent
);
var
solution
=
res
.
data
.
needsolution
.
solutionContent
;
var
solution
=
res
.
data
.
needsolution
.
solutionContent
;
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
var
needsolution
=
res
.
data
.
needsolution
;
//方案信息
solution
=
JSON
.
parse
(
solution
);
solution
=
JSON
.
parse
(
solution
);
solution
=
solution
.
solution
solution
=
solution
.
solution
solution
=
JSON
.
stringify
(
solution
)
solution
=
JSON
.
stringify
(
solution
)
//推送交付系统
//推送交付系统
var
reqParams
=
{
var
reqParams
=
{
...
@@ -526,142 +526,142 @@ async submitFoodSolution(pobj) {
...
@@ -526,142 +526,142 @@ async submitFoodSolution(pobj) {
resultInfo
:
""
,
resultInfo
:
""
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
});
//推送数据至阿里
//推送数据至阿里
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
solution
:
solution
};
};
console
.
log
(
"food"
,
pushObj
);
console
.
log
(
"food"
,
pushObj
);
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
this
.
pushSubmitSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
return
res
;
}
}
return
res
;
}
//关闭需求
//关闭需求
async
foodCloseNeed
(
pobj
)
{
async
foodCloseNeed
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
if
(
!
pobj
.
actionBody
.
needNo
)
{
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100395"
);
return
system
.
getResult
(
null
,
"actionBody.needNo can not be empty,100395"
);
}
}
if
(
!
pobj
.
actionBody
.
note
)
{
if
(
!
pobj
.
actionBody
.
note
)
{
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100395"
);
return
system
.
getResult
(
null
,
"actionBody.note can not be empty,100395"
);
}
}
var
self
=
this
;
var
self
=
this
;
pobj
.
actionBody
.
intentionBizId
=
pobj
.
actionBody
.
needNo
;
pobj
.
actionBody
.
intentionBizId
=
pobj
.
actionBody
.
needNo
;
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
pobj
.
actionType
=
"abolishIcpProgrammeByNeed"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/qcapi/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'food+++result'
,
result
)
console
.
log
(
'food+++result'
,
result
)
if
(
result
.
status
==
0
)
{
if
(
result
.
status
==
0
)
{
if
(
result
.
data
)
{
if
(
result
.
data
)
{
pobj
.
actionBody
.
orderNo
=
result
.
data
;
pobj
.
actionBody
.
orderNo
=
result
.
data
;
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
if
(
orderrtn
.
status
<
0
)
{
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
}
//推送交付系统
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
status
:
"closeNeed"
},
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
}
}
var
self
=
this
;
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/common/qcCenterOrderSve.js/foodCloseNeed"
,
content
:
JSON
.
stringify
(
reqParams
),
resultInfo
:
""
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2020-03-06"
});
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseFoodNeed"
);
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
=
{
var
reqParams
=
{
actionBody
:
{
actionBody
:
{
intentionBizId
:
pobj
.
actionBody
.
needNo
,
intentionBizId
:
pobj
.
actionBody
.
needNo
,
status
:
"
closeNeed
"
status
:
"
followingUp
"
},
},
opType
:
"updateChanceStatus"
,
opType
:
"updateChanceStatus"
,
appInfo
:
pobj
.
appInfo
appInfo
:
pobj
.
appInfo
}
}
var
self
=
this
;
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
self
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
//日志记录
//推送数据至阿里
self
.
logCtl
.
info
({
var
pushObj
=
{
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
note
:
pobj
.
actionBody
.
note
requestId
:
pobj
.
requestId
||
""
,
};
op
:
"service/impl/common/qcCenterOrderSve.js/foodCloseNeed"
,
//提交沟通记录
content
:
JSON
.
stringify
(
reqParams
),
var
r
=
await
this
.
aliclient
.
reqbyget
({
action
:
"SubmitIntentionNote"
,
reqbody
:
pushObj
,
apiVersion
:
"2020-03-06"
});
resultInfo
:
""
,
optitle
:
"updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntentionForPartner"
,
reqbody
:
{
IntentionBizId
:
pobj
.
actionBody
.
needNo
,
BizType
:
"esp.wangwen"
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2020-03-06"
});
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseFoodNeed"
);
return
system
.
getResultSuccess
();
}
else
{
return
system
.
getResult
(
null
,
"close fail 100389 "
);
}
}
//提交沟通记录
console
.
log
(
'提交沟通记录r'
,
r
)
async
foodRecordLog
(
pobj
)
{
return
system
.
getResultSuccess
();
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"
);
//查看沟通记录
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"
});
if
(
res
&&
res
.
data
&&
res
.
data
.
Data
){
var
len
=
res
.
data
.
Data
.
length
;
for
(
var
i
=
0
;
i
<
len
;
i
++
){
res
.
data
.
Data
[
i
].
CreateTime
=
res
.
data
.
Data
[
i
].
CreateTime
/
1000
}
}
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"
});
if
(
res
&&
res
.
data
&&
res
.
data
.
Data
)
{
var
len
=
res
.
data
.
Data
.
length
;
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
res
.
data
.
Data
[
i
].
CreateTime
=
res
.
data
.
Data
[
i
].
CreateTime
/
1000
}
}
return
system
.
getResultSuccess
(
res
);
}
}
return
system
.
getResultSuccess
(
res
);
}
//推送订单状态
//推送订单状态
async
pushOrderStatus
(
pobj
){
async
pushOrderStatus
(
pobj
)
{
if
(
!
pobj
.
interface_params
)
{
if
(
!
pobj
.
interface_params
)
{
return
system
.
getResult
(
null
,
"interface_params can not be empty,100400"
);
return
system
.
getResult
(
null
,
"interface_params can not be empty,100400"
);
}
}
let
interface_params_info
=
JSON
.
parse
(
pobj
.
interface_params
);
let
interface_params_info
=
JSON
.
parse
(
pobj
.
interface_params
);
if
(
!
interface_params_info
||
!
interface_params_info
.
action
||
interface_params_info
.
apiVersion
)
{
if
(
!
interface_params_info
||
!
interface_params_info
.
action
||
!
interface_params_info
.
apiVersion
)
{
return
system
.
getResult
(
null
,
"interface_params(action、apiVersion) can not be empty,100430"
);
return
system
.
getResult
(
null
,
"interface_params(action、apiVersion) can not be empty,100430"
);
}
}
let
pushObj
=
{
let
pushObj
=
{
BizId
:
pobj
.
pushObj
.
BizId
,
BizId
:
pobj
.
pushObj
.
BizId
,
...
@@ -669,35 +669,35 @@ async foodRecordLogList(pobj) {
...
@@ -669,35 +669,35 @@ async foodRecordLogList(pobj) {
ApplicationStatus
:
pobj
.
pushObj
.
ApplicationStatus
ApplicationStatus
:
pobj
.
pushObj
.
ApplicationStatus
};
};
let
obj
=
{
let
obj
=
{
action
:
interface_params_info
.
action
,
action
:
interface_params_info
.
action
,
reqbody
:
pushObj
,
reqbody
:
pushObj
,
apiVersion
:
interface_params_info
.
apiVersion
apiVersion
:
interface_params_info
.
apiVersion
}
}
let
result
=
await
this
.
aliclient
.
reqbyget
(
obj
);
let
result
=
await
this
.
aliclient
.
reqbyget
(
obj
);
return
result
;
return
result
;
}
}
// //推送ICP方案
// //推送ICP方案
// async pushIcpSolution1(pushObj, solutionNo, appInfo, self) {
// async pushIcpSolution1(pushObj, solutionNo, appInfo, self) {
// //推送方案确认信息
// //推送方案确认信息
// var confirmRes = await this.aliclient.reqbyget({ action: "ConfirmIntention", reqbody: { BizId: pushObj.IntentionBizId }, apiVersion: "2019-05-08" });
// var confirmRes = await this.aliclient.reqbyget({ action: "ConfirmIntention", reqbody: { BizId: pushObj.IntentionBizId }, apiVersion: "2019-05-08" });
// console.log("confirmRes",confirmRes)
// console.log("confirmRes",confirmRes)
// // if (confirmRes && confirmRes.status == 0 && confirmRes.data) {
// // if (confirmRes && confirmRes.status == 0 && confirmRes.data) {
// // var confirmResData = confirmRes.data;
// // var confirmResData = confirmRes.data;
// // if (confirmResData.ConfirmUrl) {
// // if (confirmResData.ConfirmUrl) {
// // var reqObj3 = {
// // var reqObj3 = {
// // actionType: "receiveIcpConfirmUrl",
// // actionType: "receiveIcpConfirmUrl",
// // appInfo: appInfo,
// // appInfo: appInfo,
// // actionBody: {
// // actionBody: {
// // solutionNo: solutionNo,
// // solutionNo: solutionNo,
// // confirmUrl: confirmResData.ConfirmUrl
// // confirmUrl: confirmResData.ConfirmUrl
// // }
// // }
// // };
// // };
// // var a = await self.reqCenterOrderApi(reqObj3);//保存用户确认方案url
// // var a = await self.reqCenterOrderApi(reqObj3);//保存用户确认方案url
// // }
// // }
// // }
// // }
// // return confirmRes;
// // return confirmRes;
// }
// }
}
}
module
.
exports
=
QcCenterOrderService
;
module
.
exports
=
QcCenterOrderService
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
View file @
40b40292
...
@@ -499,13 +499,13 @@ class UtilsNeedService2 extends AppServiceBase {
...
@@ -499,13 +499,13 @@ class UtilsNeedService2 extends AppServiceBase {
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need2/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need2/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
//2020-10-28 laolan start
//2020-10-28 laolan start
if
(
result
&&
result
.
status
==
0
&&
result
.
data
&&
result
.
data
.
uappIds
){
if
(
result
&&
result
.
status
==
0
&&
result
.
data
){
if
(
result
.
data
.
uappIds
==
uappId
.
ali
){
if
(
result
.
data
==
uappId
.
aliConfirmResult
){
var
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"writeCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
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
)
console
.
log
(
"ali+res"
,
res
)
}
}
if
(
result
.
data
.
uappIds
==
uappId
.
baidu
){
if
(
result
.
data
==
uappId
.
baidu
){
var
ress
=
await
self
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/provider/communication"
,
reqbody
:
{
bizId
:
pobj
.
actionBody
.
intentionBizId
,
note
:
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
)
}
}
}
}
...
@@ -534,15 +534,16 @@ class UtilsNeedService2 extends AppServiceBase {
...
@@ -534,15 +534,16 @@ class UtilsNeedService2 extends AppServiceBase {
}
}
async
queryExpertApplyCommunicationLogs
(
pobj
)
{
async
queryExpertApplyCommunicationLogs
(
pobj
)
{
if
(
!
pobj
.
actionBody
.
intentionBizId
)
{
//
if (!pobj.actionBody.intentionBizId) {
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100493"
);
//
return system.getResult(null, "actionBody.intentionBizId can not be empty,100493");
}
//
}
if
(
!
pobj
.
actionBody
.
userFeedBack
)
{
//
if (!pobj.actionBody.userFeedBack) {
return
system
.
getResult
(
null
,
"actionBody.userFeedBack can not be empty,100494"
);
//
return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
}
//
}
//2020-10-28 laolan start
//2020-10-28 laolan start
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need2/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need2/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
console
.
log
(
'jilu+++result++++'
,
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
({
...
@@ -558,16 +559,15 @@ class UtilsNeedService2 extends AppServiceBase {
...
@@ -558,16 +559,15 @@ class UtilsNeedService2 extends AppServiceBase {
}
}
if
(
result
.
data
.
uapp_id
==
uappId
.
baidu
){
if
(
result
.
data
.
uapp_id
==
uappId
.
baidu
){
console
.
log
(
"bbbbb++"
,
pobj
)
var
res
=
await
this
.
baiduclient
.
baiduReqbyget
({
var
res
=
await
this
.
baiduclient
.
baiduReqbyget
({
path
:
"/api/bla/providerommunication/list"
,
reqbody
:
{
path
:
"/api/bla/provider
/c
ommunication/list"
,
reqbody
:
{
beginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
beginTime
:
pobj
.
actionBody
.
BeginTime
?
pobj
.
actionBody
.
BeginTime
:
""
,
endTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
endTime
:
pobj
.
actionBody
.
EndTime
?
pobj
.
actionBody
.
EndTime
:
""
,
bizId
:
pobj
.
actionBody
.
intentionBizId
,
requirementId
:
pobj
.
actionBody
.
intentionBizId
userFeedBack
:
pobj
.
actionBody
.
userFeedBack
,
pageNum
:
pobj
.
actionBody
.
pageNum
||
1
,
pageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
}
}
});
});
console
.
log
(
'xxcc+++'
,
res
)
}
}
}
}
...
@@ -581,7 +581,7 @@ class UtilsNeedService2 extends AppServiceBase {
...
@@ -581,7 +581,7 @@ class UtilsNeedService2 extends AppServiceBase {
// var updateRes = await this.utilsneedSve.dao.customUpdate(sql, paramWhere);
// var updateRes = await this.utilsneedSve.dao.customUpdate(sql, paramWhere);
// }
// }
// func();
// func();
return
system
.
getResultSuccess
(
res
)
;
return
res
;
}
}
/**
/**
...
...
center-channel/app/base/service/impl/utilsSve/utilsPushSve.js
View file @
40b40292
...
@@ -66,12 +66,14 @@ class UtilsPushService extends AppServiceBase {
...
@@ -66,12 +66,14 @@ class UtilsPushService extends AppServiceBase {
let
result
;
let
result
;
if
(
interface_list_temp
&&
interface_list_temp
.
length
==
1
)
{
if
(
interface_list_temp
&&
interface_list_temp
.
length
==
1
)
{
const
element
=
interface_list_temp
[
0
];
const
element
=
interface_list_temp
[
0
];
var
reflexActionRes
=
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
let
reflexActionRes
=
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
self
.
execClientNew
.
execLogs
(
"pushBusInfo-reflexAction-result:"
,
pobj
,
"center-channel-reflexAction"
,
reflexActionRes
,
null
);
return
reflexActionRes
;
return
reflexActionRes
;
}
else
{
}
else
{
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
interface_list_temp
.
length
;
index
++
)
{
const
element
=
interface_list_temp
[
index
];
const
element
=
interface_list_temp
[
index
];
result
=
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
result
=
await
self
.
reflexAction
(
element
,
opType
,
pobj
,
isDelProductInfo
);
self
.
execClientNew
.
execLogs
(
"pushBusInfo-for---reflexAction-result:"
,
pobj
,
"center-channel-reflexAction"
,
result
,
null
);
}
}
return
result
;
return
result
;
}
}
...
@@ -84,9 +86,8 @@ class UtilsPushService extends AppServiceBase {
...
@@ -84,9 +86,8 @@ class UtilsPushService extends AppServiceBase {
return
system
.
getResult
(
null
,
"暂无推送配置"
);
return
system
.
getResult
(
null
,
"暂无推送配置"
);
}
}
var
result
=
await
this
.
reflexAction
(
interface_info
,
pobj
.
opType
,
pobj
,
pobj
.
isDelProductInfo
||
1
);
var
result
=
await
this
.
reflexAction
(
interface_info
,
pobj
.
opType
,
pobj
,
pobj
.
isDelProductInfo
||
1
);
this
.
execClientNew
.
execLogs
(
"againPushBusInfo-reflexAction-result:"
,
pobj
,
"center-channel-reflexAction"
,
result
,
null
);
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
//TODO:记录推送失败的log
this
.
execClientNew
.
execLogs
(
"pushBusInfo-reflexAction-result:"
,
pobj
,
"center-channel-reflexAction"
,
result
,
null
);
return
result
;
return
result
;
}
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
...
...
center-channel/app/base/utils/baiduClient.js
View file @
40b40292
...
@@ -21,49 +21,31 @@ class baiduClient {
...
@@ -21,49 +21,31 @@ class baiduClient {
let
timestamp
=
new
Date
().
toISOString
()
let
timestamp
=
new
Date
().
toISOString
()
let
site
=
timestamp
.
lastIndexOf
(
"."
);
let
site
=
timestamp
.
lastIndexOf
(
"."
);
timestamp
=
timestamp
.
substring
(
0
,
site
)
+
"Z"
timestamp
=
timestamp
.
substring
(
0
,
site
)
+
"Z"
// let timestamp = "2020-11-05T04:00:00Z"
console
.
log
(
'timestamp++'
,
timestamp
)
let
signedHeaders
=
"host"
;
let
signedHeaders
=
"host"
;
let
extime
=
1800
;
let
extime
=
1800
;
// 因为是post,所以CanonicalQueryString为空
// var signArr = [];
// var keys = Object.keys(actionBody).sort();
// if (keys.length == 0) {
// return system.getResult(null, "请求参数信息为空");
// }
// for (let k = 0; k < keys.length; k++) {
// const tKey = keys[k];
// if (tKey != "sign" && actionBody[tKey] && !(typeof (actionBody[tKey]) === "object")) {
// signArr.push(urlencode(tKey) + "=" + urlencode(actionBody[tKey]));
// }
// }
// let resultSignStr = signArr.join("&");
// console.log('resultSignStr+++',resultSignStr)
let
canonicalHeaders
=
"host:gwgp-mwnn9gk4o4e.i.bdcloudapi.com"
let
canonicalHeaders
=
"host:gwgp-mwnn9gk4o4e.i.bdcloudapi.com"
//中间结果1:规范化请求和前缀字符串
//中间结果1:规范化请求和前缀字符串
let
canonicalRequest
=
"POST"
+
"
\
n"
+
path
+
"
\
n"
+
"
\
n"
+
canonicalHeaders
;
let
canonicalRequest
=
"POST"
+
"
\
n"
+
path
+
"
\
n"
+
"
\
n"
+
canonicalHeaders
;
console
.
log
(
'canonicalRequest+++'
,
canonicalRequest
)
//authStringPrefix(前缀字符串,由除sk字段外的签名信息生成)
//authStringPrefix(前缀字符串,由除sk字段外的签名信息生成)
let
authStringPrefix
=
version
+
"/"
+
accessKey
+
"/"
+
timestamp
+
"/"
+
extime
;
let
authStringPrefix
=
version
+
"/"
+
accessKey
+
"/"
+
timestamp
+
"/"
+
extime
;
console
.
log
(
'authStringPrefix+++'
,
authStringPrefix
)
//中间结果2:派生签名密钥 signingKey
//中间结果2:派生签名密钥 signingKey
let
signingKey
=
crypto
.
createHmac
(
'sha256'
,
secretKey
)
let
signingKey
=
crypto
.
createHmac
(
'sha256'
,
secretKey
)
.
update
(
authStringPrefix
)
.
update
(
authStringPrefix
)
.
digest
(
'hex'
);
.
digest
(
'hex'
);
console
.
log
(
'signingKey+++'
,
signingKey
)
//中间结果3:签名摘要 signature
//中间结果3:签名摘要 signature
let
signature
=
crypto
.
createHmac
(
'sha256'
,
signingKey
)
let
signature
=
crypto
.
createHmac
(
'sha256'
,
signingKey
)
.
update
(
canonicalRequest
)
.
update
(
canonicalRequest
)
.
digest
(
'hex'
);
.
digest
(
'hex'
);
console
.
log
(
'signature+++'
,
signature
)
//最终结果:认证字符串 authorization
//最终结果:认证字符串 authorization
let
authorization
=
authStringPrefix
+
"/"
+
signedHeaders
+
"/"
+
signature
;
let
authorization
=
authStringPrefix
+
"/"
+
signedHeaders
+
"/"
+
signature
;
console
.
log
(
'authorization+++'
,
authorization
)
var
baiduObj
=
{
var
baiduObj
=
{
authorization
:
authorization
,
authorization
:
authorization
,
data
:
actionBody
data
:
actionBody
}
}
var
rtn
=
await
this
.
execClient
.
execBaiduPost
(
baiduObj
,
url
);
var
rtn
=
await
this
.
execClient
.
execBaiduPost
(
baiduObj
,
url
);
console
.
log
(
"baiduObj+++++"
,
baiduObj
)
console
.
log
(
"url+++++"
,
url
)
console
.
log
(
"rtn+++++"
,
rtn
)
if
(
!
rtn
||
!
rtn
.
stdout
)
{
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost data is empty"
);
return
system
.
getResult
(
null
,
"execPost data is empty"
);
}
}
...
@@ -73,7 +55,6 @@ class baiduClient {
...
@@ -73,7 +55,6 @@ class baiduClient {
//百度接口 2020-10-27 laolan
//百度接口 2020-10-27 laolan
async
baiduReqbyget
(
obj
,
cbk
)
{
async
baiduReqbyget
(
obj
,
cbk
)
{
console
.
log
(
'obj+++'
,
obj
)
var
path
=
obj
.
path
;
var
path
=
obj
.
path
;
var
reqbody
=
obj
.
reqbody
;
var
reqbody
=
obj
.
reqbody
;
try
{
try
{
...
@@ -111,69 +92,5 @@ class baiduClient {
...
@@ -111,69 +92,5 @@ class baiduClient {
return
system
.
getResultFail
(
-
200
,
"出现异常,error:"
+
e
.
stack
);
return
system
.
getResultFail
(
-
200
,
"出现异常,error:"
+
e
.
stack
);
}
}
}
}
async
test
(){
var
obj
=
{
path
:
"/api/bla/provider/plan"
,
reqbody
:{
"area"
:
"北京"
,
"companyName"
:
"demoData"
,
"companyAddress"
:
"demoData"
,
"requirementId"
:
"TRE-nmnHtEoTjeE"
,
"type"
:
"ICP"
}
};
var
actionBody
=
obj
.
reqbody
;
var
path
=
obj
.
path
;
let
domain
=
"https://gwgp-mwnn9gk4o4e.i.bdcloudapi.com"
;
let
url
=
domain
+
path
;
let
version
=
"bce-auth-v1"
;
let
accessKey
=
"ed0f5c4c7c2d4e87aa335d9b07bf9bd4"
;
let
secretKey
=
"f600c4e91f6d43998d637401e6e34ef9"
;
let
timestamp
=
new
Date
().
toISOString
();
let
signedHeaders
=
"host"
;
let
extime
=
1800
;
var
signArr
=
[];
var
keys
=
Object
.
keys
(
actionBody
).
sort
();
if
(
keys
.
length
==
0
)
{
return
system
.
getResult
(
null
,
"请求参数信息为空"
);
}
for
(
let
k
=
0
;
k
<
keys
.
length
;
k
++
)
{
const
tKey
=
keys
[
k
];
if
(
tKey
!=
"sign"
&&
actionBody
[
tKey
]
&&
!
(
typeof
(
actionBody
[
tKey
])
===
"object"
))
{
signArr
.
push
(
urlencode
(
tKey
)
+
"="
+
urlencode
(
actionBody
[
tKey
]));
}
}
let
resultSignStr
=
signArr
.
join
(
"&"
);
console
.
log
(
'resultSignStr+++'
,
resultSignStr
)
let
canonicalHeaders
=
"host:gwgp-mwnn9gk4o4e.i.bdcloudapi.com"
//中间结果1:规范化请求和前缀字符串
let
canonicalRequest
=
"POST"
+
"
\
n"
+
path
+
"
\
n"
+
resultSignStr
+
"
\
n"
+
canonicalHeaders
;
//authStringPrefix(前缀字符串,由除sk字段外的签名信息生成)
let
authStringPrefix
=
version
+
"/"
+
accessKey
+
"/"
+
timestamp
+
"/"
+
extime
;
//中间结果2:派生签名密钥 signingKey
let
signingKey
=
crypto
.
createHmac
(
'sha256'
,
secretKey
)
.
update
(
authStringPrefix
)
.
digest
(
'hex'
);
//中间结果3:签名摘要 signature
let
signature
=
crypto
.
createHmac
(
'sha256'
,
signingKey
)
.
update
(
canonicalRequest
)
.
digest
(
'hex'
);
//最终结果:认证字符串 authorization
let
authorization
=
authStringPrefix
+
"/"
+
signedHeaders
+
"/"
+
signature
;
var
baiduObj
=
{
authorization
:
authorization
,
data
:
actionBody
}
var
rtn
=
await
this
.
execClient
.
execBaiduPost
(
baiduObj
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost data is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
!
result
||
!
result
.
result
){
return
system
.
getResultFail
(
"推送失败"
);
}
return
system
.
getResultSuccess
();
}
}
}
module
.
exports
=
baiduClient
;
module
.
exports
=
baiduClient
;
center-channel/app/config/businessConfig.js
View file @
40b40292
...
@@ -18,7 +18,7 @@ module.exports = {
...
@@ -18,7 +18,7 @@ module.exports = {
"foodCloseNeed"
,
"foodRecordLog"
,
"foodRecordLogList"
,
"getParamsFor360"
,
"addOrderWeb"
,
"getPayRecords"
,
"getLoginInfo"
,
"putUserMobileByVcode"
,
"foodCloseNeed"
,
"foodRecordLog"
,
"foodRecordLogList"
,
"getParamsFor360"
,
"addOrderWeb"
,
"getPayRecords"
,
"getLoginInfo"
,
"putUserMobileByVcode"
,
"putUserPwdByMobile"
,
"icpNotifyNew"
"putUserPwdByMobile"
,
"icpNotifyNew"
],
],
apiMustUserpinList
:
[
"submitNeed"
,
"paySuccess"
,
"icpNotify"
,
"getLoginInfo"
,
"icpNotifyNew"
,
"submitIcpProgramme"
,
"serviceProviderSubmitMaterial"
,
"abolishIcpProgramme"
,
"submitService"
],
apiMustUserpinList
:
[
"submitNeed"
,
"paySuccess"
,
"icpNotify"
,
"getLoginInfo"
,
"icpNotifyNew"
,
"submitIcpProgramme"
,
"serviceProviderSubmitMaterial"
,
"abolishIcpProgramme"
,
"submitService"
,
"serviceProviderNotification"
],
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"
]
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"
]
}
}
}
}
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