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
83f0055d
Commit
83f0055d
authored
Nov 27, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
e85f0f48
17a29d5c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
184 deletions
+29
-184
center-channel/app/base/api/impl/opreceive/service.js
+13
-0
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+4
-177
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+2
-1
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
+4
-0
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+6
-6
No files found.
center-channel/app/base/api/impl/opreceive/service.js
View file @
83f0055d
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
axios
=
require
(
"axios"
);
class
edi
extends
APIBase
{
constructor
()
{
super
();
...
...
@@ -11,6 +12,18 @@ class edi extends APIBase {
}
async
create
(
pobj
,
query
,
req
)
{
if
(
settings
.
env
!=
"dev"
)
{
axios
.
post
(
'https://oapi.dingtalk.com/robot/send?access_token=2995a6336bbddb3a4704fdb201ad244784e625b8af7ac5f0877c86e5a58ae164'
,{
msgtype
:
'text'
,
text
:{
content
:
"磐农来服务单啦!"
+
JSON
.
stringify
(
pobj
)
},
at
:
{
atMobiles
:
[
"13911391996"
]
},
isAtAll
:
false
})
}
console
.
log
(
pobj
);
this
.
logCtl
.
info
({
op
:
"service/impl/utilsSve/service.js/create"
,
...
...
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
View file @
83f0055d
...
...
@@ -105,7 +105,6 @@ class BaseCenterOrderService extends AppServiceBase {
needsolution
.
solutionContent
=
JSON
.
parse
(
needsolution
.
solutionContent
);
}
var
solution
=
needsolution
.
solutionContent
.
solution
;
if
(
ab
.
isTest
&&
ab
.
isTest
==
1
){
var
reqPushParams
=
{
actionBody
:
{
uapp_id
:
needinfo
.
uapp_id
,
...
...
@@ -122,57 +121,6 @@ class BaseCenterOrderService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
};
await
this
.
utilsPushSve
.
business2Channel
(
reqPushParams
,
"pushIcpSolution2Channel"
);
}
else
{
var
self
=
this
;
//2020-10-26 laolan 区分百度与阿里
if
(
needinfo
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
// var bizType = needinfo.channelTypeCode;//业务类型里
var
pushObj
=
{
IntentionBizId
:
needinfo
.
channelNeedNo
,
CompanyName
:
solution
.
CompanyName
,
IcpType
:
solution
.
IcpType
,
CompanyAddress
:
solution
.
CompanyAddress
,
Area
:
solution
.
Area
,
Note
:
solution
.
Note
,
ActionType
:
solution
.
ActionType
,
Source
:
"官网"
};
if
(
needsolution
.
channelSolutionNo
)
{
pushObj
[
"BizId"
]
=
needsolution
.
channelSolutionNo
;
}
var
pushIcpSolutionRes
=
await
this
.
pushIcpSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
}
if
(
needinfo
.
uapp_id
==
uappId
.
baidu
){
//推送数据至baidu
// var bizType = needinfo.channelTypeCode;//业务类型里
solution
.
Area
=
cityLetter
[
solution
.
Area
]
console
.
log
(
'solution.Area++'
,
solution
.
Area
)
var
pushObj
=
{
requirementId
:
needinfo
.
channelNeedNo
,
companyName
:
solution
.
CompanyName
,
companyAddress
:
solution
.
CompanyAddress
,
area
:
solution
.
Area
,
type
:
solution
.
IcpType
};
if
(
needsolution
.
channelSolutionNo
)
{
pushObj
[
"bizId"
]
=
needsolution
.
channelSolutionNo
;
}
console
.
log
(
'pushObj++'
,
pushObj
)
var
pushIcpSolutionRes
=
await
this
.
pushBaiduIcpSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
}
this
.
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/submitIcpProgramme"
,
content
:
JSON
.
stringify
(
pobj
),
resultInfo
:
JSON
.
stringify
(
needinfo
),
optitle
:
"createSolution推送蜂擎获取的接口信息->aliBusiness2Delivery"
,
});
}
var
reqParams
=
{
actionBody
:
{
intentionBizId
:
needinfo
.
channelNeedNo
,
...
...
@@ -181,8 +129,6 @@ class BaseCenterOrderService extends AppServiceBase {
appInfo
:
pobj
.
appInfo
}
await
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"updateChanceStatus"
);
//
// return system.getResultSuccess(pushIcpSolutionRes);
}
return
res
;
}
...
...
@@ -315,7 +261,6 @@ class BaseCenterOrderService extends AppServiceBase {
};
var
url
=
await
self
.
reqCenterOrderApi
(
reqObj3
);
//保存用户确认方案url
console
.
log
(
'save confirmUrl ++ '
,
url
)
// return pushRes;
}
}
}
...
...
@@ -450,7 +395,6 @@ class BaseCenterOrderService extends AppServiceBase {
}
var
material
=
ab
.
material
;
var
reqPushParams
=
{};
if
(
ab
.
isTest
&&
ab
.
isTest
==
1
){
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
var
BizId
=
needsolution
.
channelSolutionNo
;
//⽅案业务ID
...
...
@@ -512,87 +456,9 @@ class BaseCenterOrderService extends AppServiceBase {
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
)
var
result
=
await
this
.
utilsPushSve
.
business2Channel
(
reqPushParams
,
"serviceProviderSubmit2Material"
);
console
.
log
(
'result+++-cailiao--++++----'
,
result
)
console
.
log
(
'result+++-reqPushParams--++++----'
,
reqPushParams
)
return
res
}
}
...
...
@@ -661,7 +527,6 @@ class BaseCenterOrderService extends AppServiceBase {
console
.
log
(
'zhuangtai ++++'
,
pobj
)
var
res
=
await
this
.
reqCenterOrderApi
(
pobj
,
"action/qcapi/springBoard"
);
if
(
res
&&
res
.
status
==
0
&&
res
.
data
)
{
if
(
pobj
.
actionBody
.
isTest
&&
pobj
.
actionBody
.
isTest
==
1
){
var
reqPushParams
=
{};
if
(
res
.
data
.
uapp_id
==
uappId
.
ali
){
//推送数据至阿里
...
...
@@ -690,45 +555,7 @@ class BaseCenterOrderService extends AppServiceBase {
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
};
//推送状态变更
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
};
//推送状态变更
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
;
}
}
//交付单关闭
...
...
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
83f0055d
...
...
@@ -168,7 +168,8 @@ class UtilsFqAliyunService extends AppServiceBase {
"productId"
:
productInfo
.
price_item
.
service_code
,
// 云服产品skuid,必填
"goodsId"
:
pobj
.
actionBody
.
goodsId
,
// 官网产品id
"customerId"
:
pobj
.
actionBody
.
customerId
,
//客户Id,必填
"product_item"
:
pobj
.
actionBody
.
product_item
"product_item"
:
pobj
.
actionBody
.
product_item
,
"device_token"
:
pobj
.
actionBody
.
device_token
//设备编号参数
}
pobj
.
params
=
icOrderParams
;
var
result
=
await
this
.
opICClientPost
(
pobj
,
interface_params_info
.
opUrl
,
interface_params_info
.
key
,
interface_params_info
.
secret
,
icOrderParams
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve2.js
View file @
83f0055d
...
...
@@ -561,6 +561,10 @@ class UtilsNeedService2 extends AppServiceBase {
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2019-05-08"
});
for
(
var
i
=
0
;
i
<
res
.
data
.
Data
.
length
;
i
++
){
res
.
data
.
Data
[
i
][
'createTime'
]
=
new
Date
(
res
.
data
.
Data
[
i
].
CreateTime
).
toISOString
()
res
.
data
.
Data
[
i
][
'content'
]
=
res
.
data
.
Data
[
i
].
Note
}
}
if
(
result
.
data
.
uapp_id
==
uappId
.
baidu
)
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
83f0055d
...
...
@@ -1318,12 +1318,12 @@ class UtilsOrderService extends AppServiceBase {
if
(
!
actionBody
.
quantity
||
Number
(
actionBody
.
quantity
)
<=
0
)
{
return
system
.
getResult
(
null
,
"订单数量为空或有误,100030"
);
}
//
if (!actionBody.goodsId) {
//
return system.getResult(null, "官网产品id不能为空")
//
}
//
if (!actionBody.customerId) {
//
return system.getResult(null, '客户Id不能为空')
//
}
if
(
!
actionBody
.
goodsId
)
{
return
system
.
getResult
(
null
,
"官网产品id不能为空"
)
}
if
(
!
actionBody
.
customerId
)
{
return
system
.
getResult
(
null
,
'客户Id不能为空'
)
}
if
(
actionBody
.
deliveryData
.
nclones
.
length
<=
0
)
{
return
system
.
getResult
(
null
,
'尼斯不能为空'
)
}
...
...
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