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
5d7dbd9b
Commit
5d7dbd9b
authored
Jan 20, 2021
by
王悦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专家辅助注册
parent
450e3803
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
76 deletions
+151
-76
center-channel/app/base/api/impl/opreceive/need.js
+4
-1
center-channel/app/base/service/app.base.js
+12
-0
center-channel/app/base/service/impl/common/centerorderSve.js
+8
-1
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+120
-74
center-channel/app/config/settings.js
+7
-0
No files found.
center-channel/app/base/api/impl/opreceive/need.js
View file @
5d7dbd9b
...
@@ -70,10 +70,13 @@ class Need extends APIBase {
...
@@ -70,10 +70,13 @@ class Need extends APIBase {
break
;
break
;
case
"icpNotify"
:
//icp方案更新
case
"icpNotify"
:
//icp方案更新
opResult
=
await
this
.
utilsNeedSve
.
icpNotify
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsNeedSve
.
icpNotify
(
pobj
,
pobj
.
actionBody
);
if
(
opResult
.
status
==
0
&&
pobj
.
actionBody
.
status
==
1
)
{
if
(
!
pobj
.
actionBody
.
bizId
.
startsWith
(
"TM_"
)
&&
opResult
.
status
==
0
&&
(
pobj
.
actionBody
.
status
==
1
||
pobj
.
actionBody
.
status
==
0
)
)
{
opResult
=
await
self
.
centerorderSve
.
icppaysuccess
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
self
.
centerorderSve
.
icppaysuccess
(
pobj
,
pobj
.
actionBody
);
}
}
break
;
break
;
case
"tmNotifySub"
:
//tm建案成功
opResult
=
await
self
.
centerorderSve
.
tmsave
(
pobj
,
pobj
.
actionBody
);
break
;
case
"writeCommunicationLog"
:
//icp接收方案反馈信息
case
"writeCommunicationLog"
:
//icp接收方案反馈信息
opResult
=
await
this
.
utilsNeedSve2
.
writeCommunicationLog
(
pobj
);
opResult
=
await
this
.
utilsNeedSve2
.
writeCommunicationLog
(
pobj
);
break
;
break
;
...
...
center-channel/app/base/service/app.base.js
View file @
5d7dbd9b
...
@@ -500,5 +500,17 @@ class AppServiceBase {
...
@@ -500,5 +500,17 @@ class AppServiceBase {
}
}
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
async
getFQbossSign
(
pobj
){
var
signArr
=
[];
var
keys
=
Object
.
keys
(
pobj
).
sort
();
for
(
let
k
=
0
;
k
<
keys
.
length
;
k
++
)
{
const
tKey
=
keys
[
k
];
if
(
tKey
!=
"sign"
&&
pobj
[
tKey
])
{
signArr
.
push
(
tKey
+
"="
+
pobj
[
tKey
]);
}
}
var
resultSignStr
=
signArr
.
join
(
"&"
)
+
"&key="
+
"9c83f5f5c41347fc9bb47951fef3199b"
;
return
md5
(
resultSignStr
).
toUpperCase
();
}
}
}
module
.
exports
=
AppServiceBase
;
module
.
exports
=
AppServiceBase
;
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
5d7dbd9b
...
@@ -234,7 +234,14 @@ class CenterorderService extends AppServiceBase {
...
@@ -234,7 +234,14 @@ class CenterorderService extends AppServiceBase {
}
}
return
system
.
getResultSuccess
(
data
.
data
);
return
system
.
getResultSuccess
(
data
.
data
);
}
}
//商标保存tm_、创建方案
async
tmsave
(
pobj
){
pobj
.
actionType
=
"addOrderDelivery"
let
url
=
this
.
centerOrderUrl
+
"action/tmreview/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
}
//状态更新
async
icppaysuccess
(
pobj
)
{
async
icppaysuccess
(
pobj
)
{
var
sobj
=
{
var
sobj
=
{
actionType
:
"getaliicpProduce"
,
actionType
:
"getaliicpProduce"
,
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
5d7dbd9b
...
@@ -29,6 +29,8 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -29,6 +29,8 @@ class UtilsNeedService extends AppServiceBase {
if
(
actionBody
.
type
==
"esp.wangwen"
||
actionBody
.
type
==
"esp.food"
)
{
if
(
actionBody
.
type
==
"esp.wangwen"
||
actionBody
.
type
==
"esp.food"
)
{
actionBody
.
area
=
this
.
wangwenAreaChange
(
actionBody
.
area
)
actionBody
.
area
=
this
.
wangwenAreaChange
(
actionBody
.
area
)
}
}
if
(
!
actionBody
.
type
&&
actionBody
.
consultType
)
actionBody
.
type
=
actionBody
.
consultType
if
(
!
actionBody
.
intentionBizId
)
{
if
(
!
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100380"
);
return
system
.
getResult
(
null
,
"actionBody.intentionBizId can not be empty,100380"
);
}
}
...
@@ -54,6 +56,10 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -54,6 +56,10 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
actionBody
.
type
=
"ali.edi"
;
pobj
.
actionBody
.
type
=
"ali.edi"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
"tmjy"
)
{
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
"tmjy"
)
{
pobj
.
actionBody
.
type
=
"ali.tmd"
;
pobj
.
actionBody
.
type
=
"ali.tmd"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
1
)
{
pobj
.
actionBody
.
type
=
"ali.tmd"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
2
)
{
pobj
.
actionBody
.
type
=
"ali.tm"
;
}
}
...
@@ -82,17 +88,21 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -82,17 +88,21 @@ class UtilsNeedService extends AppServiceBase {
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
)
{
if
(
pobj
.
actionBody
.
channel_type_code
==
"esp.companyreg"
)
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedBusiness"
);
}
else
{
}
else
{
var
reqParams
=
{
if
([
"ali.tm"
,
"ali.tmd"
].
includes
(
pobj
.
actionBody
.
type
)){
actionBody
:
pobj
.
actionBody
,
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedTMBusiness"
);
appInfo
:
pobj
.
appInfo
}
else
{
}
var
reqParams
=
{
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"addChance"
);
actionBody
:
pobj
.
actionBody
,
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
reqParams
,
"addChance"
);
pobj
.
actionBody
.
description
=
pobj
.
actionBody
.
description
+
" 成交概率:"
+
pobj
.
actionBody
.
level
pobj
.
actionBody
.
description
=
pobj
.
actionBody
.
description
+
" 成交概率:"
+
pobj
.
actionBody
.
level
if
(
pobj
.
actionBody
.
probability
)
{
if
(
pobj
.
actionBody
.
probability
)
{
pobj
.
actionBody
.
description
=
pobj
.
actionBody
.
description
+
"("
+
pobj
.
actionBody
.
probability
+
") "
pobj
.
actionBody
.
description
=
pobj
.
actionBody
.
description
+
"("
+
pobj
.
actionBody
.
probability
+
") "
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedICPBusiness"
);
}
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushNeedICPBusiness"
);
}
}
}
}
return
result
;
return
result
;
...
@@ -111,6 +121,16 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -111,6 +121,16 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
intentionStatus
=
pobj
.
actionBody
.
intentionStatus
;
pobj
.
intentionStatus
=
pobj
.
actionBody
.
intentionStatus
;
}
}
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
data
.
data
.
channelTypeCode
==
1
||
data
.
data
.
channelTypeCode
==
2
)
{
//商标
this
.
execPostUrl
({
"actionProcess"
:
"AliTm"
,
"appCode"
:
"100099"
,
"sign"
:
await
this
.
getFQbossSign
(
pobj
.
actionBody
),
actionBody
:
pobj
.
actionBody
},
settings
.
fqbossTmUrl
())
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushTMFeedback"
);
}
else
// 2020 0803 lin 修改;
// 2020 0803 lin 修改;
if
(
pobj
.
intentionStatus
)
{
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
// 如果需求当前字段为5(已关闭)则通知fq
...
@@ -118,7 +138,6 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -118,7 +138,6 @@ class UtilsNeedService extends AppServiceBase {
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
}
}
}
}
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
return
data
;
return
data
;
}
}
...
@@ -197,8 +216,10 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -197,8 +216,10 @@ class UtilsNeedService extends AppServiceBase {
if
(
!
actionBody
.
bizId
)
{
if
(
!
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100390"
);
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100390"
);
}
}
let
obj
=
{...
pobj
}
obj
.
actionType
=
"getSolutionByChannelSolutionNo"
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
itemResult
=
await
this
.
restPostUrl
(
p
obj
,
reqUrl
);
var
itemResult
=
await
this
.
restPostUrl
(
obj
,
reqUrl
);
return
itemResult
;
return
itemResult
;
}
}
/**
/**
...
@@ -352,39 +373,53 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -352,39 +373,53 @@ class UtilsNeedService extends AppServiceBase {
if
(
!
actionBody
.
bizId
)
{
if
(
!
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100495"
);
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100495"
);
}
}
actionBody
.
BizId
=
actionBody
.
bizId
;
let
isTM
=
actionBody
.
bizId
.
startsWith
(
"TM_"
)
if
(
!
actionBody
.
status
)
{
if
(
isTM
){
//商标
return
system
.
getResult
(
null
,
"actionBody.status can not be empty,100495"
);
let
result
=
await
this
.
getSolutionByChannelSolutionNo
(
pobj
,
pobj
.
actionBody
);
}
if
(
result
.
status
!==
0
){
if
(
actionBody
.
businessLicense
)
{
console
.
log
(
result
)
actionBody
.
newbusinessLicense
=
await
self
.
opDownFileInfo
(
actionBody
.
businessLicense
);
return
system
.
getResult
(
null
,
result
);
}
if
(
actionBody
.
idCardUrlList
)
{
var
jsonidCardUrlList
=
JSON
.
parse
(
actionBody
.
idCardUrlList
);
var
newidCardUrlList
=
[];
for
(
var
i
=
0
;
i
<
jsonidCardUrlList
.
length
;
i
++
)
{
var
key
=
jsonidCardUrlList
[
i
];
newidCardUrlList
.
push
(
await
self
.
opDownFileInfo
(
key
));
}
}
actionBody
.
newidCardUrlList
=
newidCardUrlList
;
actionBody
.
orderNo
=
result
.
data
.
orderNo
;
}
actionBody
.
intentionBizId
=
result
.
data
.
channelNeedNo
if
(
actionBody
.
userPlan
)
{
if
(
actionBody
.
fileUrl
)
{
actionBody
.
newuserPlan
=
await
self
.
opDownFileInfo
(
actionBody
.
userPlan
);
actionBody
.
fileUrl
=
await
self
.
opDownFileInfo
(
actionBody
.
fileUrl
);
}
}
if
(
actionBody
.
userForeig
)
{
}
else
{
actionBody
.
newuserForeig
=
await
self
.
opDownFileInfo
(
actionBody
.
userForeig
);
actionBody
.
BizId
=
actionBody
.
bizId
;
}
if
(
!
actionBody
.
status
)
{
if
(
actionBody
.
userLaw
)
{
return
system
.
getResult
(
null
,
"actionBody.status can not be empty,100495"
);
actionBody
.
newuserLaw
=
await
self
.
opDownFileInfo
(
actionBody
.
userLaw
);
}
}
if
(
actionBody
.
businessLicense
)
{
if
(
actionBody
.
userOtherList
)
{
actionBody
.
newbusinessLicense
=
await
self
.
opDownFileInfo
(
actionBody
.
businessLicense
);
var
jsonuserOtherList
=
JSON
.
parse
(
actionBody
.
userOtherList
);
}
var
newuserOtherList
=
[];
if
(
actionBody
.
idCardUrlList
)
{
for
(
var
i
=
0
;
i
<
jsonuserOtherList
.
length
;
i
++
)
{
var
jsonidCardUrlList
=
JSON
.
parse
(
actionBody
.
idCardUrlList
);
var
key
=
jsonuserOtherList
[
i
];
var
newidCardUrlList
=
[];
newuserOtherList
.
push
(
await
self
.
opDownFileInfo
(
key
));
for
(
var
i
=
0
;
i
<
jsonidCardUrlList
.
length
;
i
++
)
{
var
key
=
jsonidCardUrlList
[
i
];
newidCardUrlList
.
push
(
await
self
.
opDownFileInfo
(
key
));
}
actionBody
.
newidCardUrlList
=
newidCardUrlList
;
}
if
(
actionBody
.
userPlan
)
{
actionBody
.
newuserPlan
=
await
self
.
opDownFileInfo
(
actionBody
.
userPlan
);
}
if
(
actionBody
.
userForeig
)
{
actionBody
.
newuserForeig
=
await
self
.
opDownFileInfo
(
actionBody
.
userForeig
);
}
if
(
actionBody
.
userLaw
)
{
actionBody
.
newuserLaw
=
await
self
.
opDownFileInfo
(
actionBody
.
userLaw
);
}
if
(
actionBody
.
userOtherList
)
{
var
jsonuserOtherList
=
JSON
.
parse
(
actionBody
.
userOtherList
);
var
newuserOtherList
=
[];
for
(
var
i
=
0
;
i
<
jsonuserOtherList
.
length
;
i
++
)
{
var
key
=
jsonuserOtherList
[
i
];
newuserOtherList
.
push
(
await
self
.
opDownFileInfo
(
key
));
}
actionBody
.
newuserOtherList
=
newuserOtherList
;
}
}
actionBody
.
newuserOtherList
=
newuserOtherList
;
}
}
if
(
actionBody
.
isDirectBuy
===
"true"
&&
(
actionBody
.
status
==
1
||
actionBody
.
status
==
0
))
{
//已支付直购不调用
if
(
actionBody
.
isDirectBuy
===
"true"
&&
(
actionBody
.
status
==
1
||
actionBody
.
status
==
0
))
{
//已支付直购不调用
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
...
@@ -393,42 +428,53 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -393,42 +428,53 @@ class UtilsNeedService extends AppServiceBase {
var
url
=
settings
.
centerOrderUrl
()
+
"action/qcapi/springBoard"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/qcapi/springBoard"
;
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
console
.
log
(
"receiveIcpStatusNotify-->"
,
rtn
)
console
.
log
(
"receiveIcpStatusNotify-->"
,
rtn
)
if
(
actionBody
.
status
==
2
)
{
if
(
isTM
){
var
deliveryObj
=
{
if
(
actionBody
.
status
==
"0"
||
actionBody
.
status
==
"23"
)
{
//付款状态,受理通知书推云服
actionBody
:
{
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushTMpaySuccess"
);
orderNo
:
rtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
needsolution
:
rtn
.
data
.
solutionContent
,
channelNeedNo
:
rtn
.
data
.
channelNeedNo
||
""
,
channelSolutionNo
:
rtn
.
data
.
channelSolutionNo
,
servicer
:
{
code
:
'gsb'
,
name
:
'公司宝'
}
},
appInfo
:
pobj
.
appInfo
}
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
if
(
actionBody
.
status
==
"4"
||
actionBody
.
status
==
"22"
)
{
//付款失败状态,商标局不受理推云服
}
this
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushTMpayRefund"
);
if
(
rtn
.
status
==
0
&&
actionBody
.
status
!=
1
&&
actionBody
.
status
!=
2
&&
rtn
.
data
)
{
var
tmpObj
=
{
actionBody
:
{
orderNo
:
rtn
.
data
.
orderNo
,
channelNeedNo
:
rtn
.
data
.
channelNeedNo
,
needsolution
:
rtn
.
data
.
solutionContent
},
appInfo
:
pobj
.
appInfo
}
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
tmpObj
,
"pushDeliveryStatusNotify"
);
//通知fqboss
pobj
.
actionBody
.
orderNo
=
rtn
.
data
.
orderNo
;
this
.
execPostUrl
({
"actionProcess"
:
"AliTm"
,
"appCode"
:
"100099"
,
"sign"
:
await
this
.
getFQbossSign
(
actionBody
),
actionBody
},
settings
.
fqbossTmUrl
())
if
(
actionBody
.
status
==
11
)
{
}
else
{
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
if
(
actionBody
.
status
==
2
)
{
if
(
orderrtn
.
status
<
0
)
{
var
deliveryObj
=
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
actionBody
:
{
orderNo
:
rtn
.
data
.
orderNo
,
//pobj.actionBody.channelOrder.channelOrderNo,
needsolution
:
rtn
.
data
.
solutionContent
,
channelNeedNo
:
rtn
.
data
.
channelNeedNo
||
""
,
channelSolutionNo
:
rtn
.
data
.
channelSolutionNo
,
servicer
:
{
code
:
'gsb'
,
name
:
'公司宝'
}
},
appInfo
:
pobj
.
appInfo
}
}
tmpObj
.
actionBody
.
orderNo
=
rtn
.
data
.
channelSolutionNo
;
this
.
utilsPushSve
.
aliBusiness2Delivery
(
deliveryObj
,
"pushDeliveryOrder"
);
self
.
utilsPushSve
.
aliBusiness2Fq
(
tmpObj
,
"pushOrderICPClose"
);
}
}
}
//通知更新状态
if
(
rtn
.
status
==
0
&&
actionBody
.
status
!=
1
&&
actionBody
.
status
!=
2
&&
rtn
.
data
)
{
var
tmpObj
=
{
actionBody
:
{
orderNo
:
rtn
.
data
.
orderNo
,
channelNeedNo
:
rtn
.
data
.
channelNeedNo
,
needsolution
:
rtn
.
data
.
solutionContent
},
appInfo
:
pobj
.
appInfo
}
this
.
utilsPushSve
.
aliBusiness2Delivery
(
tmpObj
,
"pushDeliveryStatusNotify"
);
pobj
.
actionBody
.
orderNo
=
rtn
.
data
.
orderNo
;
if
(
actionBody
.
status
==
11
)
{
var
orderrtn
=
await
self
.
utilsOrderSve
.
delOrder
(
pobj
,
pobj
.
actionBody
);
if
(
orderrtn
.
status
<
0
)
{
return
system
.
getResultFail
(
-
5022
,
"订单关闭失败"
);
}
tmpObj
.
actionBody
.
orderNo
=
rtn
.
data
.
channelSolutionNo
;
self
.
utilsPushSve
.
aliBusiness2Fq
(
tmpObj
,
"pushOrderICPClose"
);
}
}
//通知更新状态
}
return
rtn
;
return
rtn
;
}
}
/**
/**
...
...
center-channel/app/config/settings.js
View file @
5d7dbd9b
...
@@ -271,6 +271,13 @@ var settings = {
...
@@ -271,6 +271,13 @@ var settings = {
return
"https://fqgirl.gongsibao.com/"
;
return
"https://fqgirl.gongsibao.com/"
;
}
}
},
},
fqbossTmUrl
:
function
(){
if
(
this
.
env
==
"dev"
)
{
return
"https://fqgirlstage.gongsibao.com/api/tmsub/channelTmNotify"
}
else
{
return
"https://fqgirl.gongsibao.com/api/tmsub/channelTmNotify"
}
},
ucommuneUrl
:
function
()
{
ucommuneUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"https://m-dev.ucommune.com/"
// 优客测试环境
return
"https://m-dev.ucommune.com/"
// 优客测试环境
...
...
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