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
e3f57094
Commit
e3f57094
authored
Aug 29, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pp
parent
29aa74a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
7 deletions
+41
-7
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+41
-7
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
e3f57094
...
...
@@ -122,30 +122,64 @@ class BizOptCtl extends CtlBase {
async
closeBizopt
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
pobj
.
business_status
=
"isClosed"
;
if
(
!
qobj
.
demand_code
||
!
qobj
.
close_reason
)
{
return
system
.
getResultError
(
"缺少必要参数."
);
}
//根据需求编号去更新该条需求的状态为已关闭
try
{
let
res
=
await
this
.
service
.
updateStatusByDemandCode
(
pobj
);
//添加到记录表
pobj
.
operator
=
{
id
:
mobj
.
userid
?
mobj
.
userid
:
""
,
name
:
mobj
.
username
?
mobj
.
username
:
""
}
pobj
.
operation_type
=
"close"
;
pobj
.
operation_details
=
{
close_reason
:
pobj
.
close_reason
,
remarks
:
pobj
.
remarks
}
let
recordRes
=
await
this
.
operationrecordSve
.
insertInfo
(
pobj
);
//异步将该需求关闭信息同步到其他系统(走队列,融易算接口文档2.3)
//构造参数
let
pushUrl
=
this
.
rysUrl
+
"leads/proposal/close"
;
let
pushObj
=
{
pushUrl
:
pushUrl
,
actionType
:
"close"
,
messageBody
:
pobj
//构造参数,添加判断(有方案信息的才走队列同步到融易算,没有的直接关闭)
let
schemeRes
=
await
this
.
schemeSve
.
findInfo
(
pobj
);
if
(
schemeRes
&&
schemeRes
.
solution_bizid
)
{
let
pushObj
=
this
.
buildObj
(
pobj
,
schemeRes
);
system
.
queueOper
(
pushObj
);
}
else
{
console
.
log
(
pobj
.
demand_code
+
"该需求没有方案信息,不需要同步"
);
}
system
.
queueOper
(
pushObj
);
return
system
.
getResult
(
"关闭需求成功!"
);
}
catch
(
error
)
{
return
system
.
getResultError
(
"bizoptCtl/closeBizopt 关闭需求出错!"
);
}
}
buildObj
(
pobj
,
schemeRes
)
{
let
pushUrl
=
this
.
rysUrl
+
"leads/proposal/close"
;
let
solutionBizId
;
if
(
schemeRes
.
solution_bizid
)
{
solutionBizId
=
schemeRes
.
solution_bizid
;
}
let
pushObj
=
{
pushUrl
:
pushUrl
,
actionType
:
"close"
,
messageBody
:
{
IntentionBizId
:
pobj
.
demand_code
,
BizType
:
"bookkeeping"
,
Solution
:
{
SolutionBizId
:
solutionBizId
,
//方案编号
Note
:
pobj
.
close_reason
//备注
}
},
headData
:
{
'Source'
:
'GSB'
}
}
return
pushObj
;
}
/**
* 获取跟进详情页所有信息
* @param {*} mobj
...
...
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