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
72f184bd
Commit
72f184bd
authored
Jun 13, 2020
by
高宇强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
de1345ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
+2
-2
ic-deliver/app/base/controller/impl/bizchance/schemeCtl.js
+8
-6
ic-deliver/app/base/db/impl/bizchance/schemeDao.js
+3
-3
No files found.
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
72f184bd
...
...
@@ -89,12 +89,12 @@ class BizOptCtl extends CtlBase {
}
/*根据商机编号更新商机状态*/
async
updateStatusByDemandCode
(
pobj
,
qobj
,
req
){
async
updateStatusByDemandCode
(
pobj
,
qobj
,
req
){
//关闭需求时调用
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
currentStatus
&&
pobj
.
currentStatus
!=
'undefined'
){
try
{
var
res
=
await
this
.
service
.
updateStatusByDemandCode
(
pobj
);
await
this
.
schemeService
.
updateStatusByDemandCode
(
pobj
);
//同时更新方案的状态
//
调商城接口,回传状态信息,后加
//
如果商机状态为关闭,需要回传给商城
if
(
pobj
.
currentStatus
==
"isClosed"
){
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
requrl
=
this
.
receiveUrl
;
...
...
ic-deliver/app/base/controller/impl/bizchance/schemeCtl.js
View file @
72f184bd
...
...
@@ -195,8 +195,9 @@ class SchemeCtl extends CtlBase {
async
updateInfoByDemandCode
(
pobj
,
qobj
,
req
){
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
planInfo
&&
pobj
.
planInfo
!=
'undefined'
){
try
{
var
retn
=
await
this
.
service
.
updateInfoByDemandCode
(
pobj
);
var
bobj
=
{
"businessMode"
:
pobj
.
businessMode
,
"currentStatus"
:
"beforeSubmission"
};
//把商机状态更新回待提交方案
pobj
.
currentStatus
=
"beforeConfirmation"
;
//同时把方案的状态也更新为待确认
var
retn
=
await
this
.
service
.
updateInfoByDemandCode
(
pobj
);
//更新方案详情
var
bobj
=
{
"businessMode"
:
pobj
.
businessMode
,
"currentStatus"
:
"beforeConfirmation"
};
//同时把商机状态更新回待确认
await
this
.
bizoptService
.
updateStatusByDemandCode
(
bobj
);
return
system
.
getResult
(
"更新成功!"
);
}
...
...
@@ -227,11 +228,11 @@ class SchemeCtl extends CtlBase {
/*插入方案信息*/
async
insertInfo
(
pobj
,
qobj
,
req
){
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
currentStatus
&&
pobj
.
currentStatus
!=
'undefined'
&&
pobj
.
baseInfo
&&
pobj
.
baseInfo
!=
'undefined'
){
//商机编号必须存在
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
baseInfo
&&
pobj
.
baseInfo
!=
'undefined'
){
//商机编号必须存在
try
{
await
this
.
bizoptService
.
updateStatusByDemandCode
(
pobj
);
//修改商机状态
var
businessInfo
=
await
this
.
bizoptService
.
findInfoByDemandCode
(
pobj
);
//得到商机的信息
pobj
.
currentStatus
=
"beforeConfirmation"
;
//商机状态为待用户确认
await
this
.
bizoptService
.
updateStatusByDemandCode
(
pobj
);
//先修改商机状态
var
businessInfo
=
await
this
.
bizoptService
.
findInfoByDemandCode
(
pobj
);
//得到商机的信息,插入方案表时要用到
if
(
businessInfo
){
pobj
.
businessId
=
businessInfo
.
id
;
//商机id
pobj
.
businessType
=
businessInfo
.
business_type
;
//商机类型
...
...
@@ -244,6 +245,7 @@ class SchemeCtl extends CtlBase {
pobj
.
currentStatus
=
appconfig
.
pdict
.
businessStatus
[
businessInfo
.
business_status
];
//商机状态即为方案状态
pobj
.
statusReason
=
businessInfo
.
close_reason
;
//状态原因
}
//调商城的接口,把商机详情返回给商城
var
mobj
=
pobj
;
mobj
.
businessType
=
appconfig
.
pdict
.
fdyDict
[
pobj
.
businessType
];
var
rc
=
system
.
getObject
(
"util.execClient"
);
...
...
ic-deliver/app/base/db/impl/bizchance/schemeDao.js
View file @
72f184bd
...
...
@@ -21,14 +21,14 @@ class SchemeDao extends Dao {
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
/*根据
方案
编号更新方案详情*/
/*根据
商机
编号更新方案详情*/
async
updateInfoByDemandCode
(
qobj
,
t
){
var
whereobj
=
{
"demand_code"
:
qobj
.
businessMode
};
var
setobj
=
{
"scheme_info"
:
qobj
.
planInfo
};
var
setobj
=
{
"scheme_info"
:
qobj
.
planInfo
,
"scheme_status"
:
qobj
.
currentStatus
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
/*根据
商机
编号更新方案编号*/
/*根据
方案
编号更新方案编号*/
async
updateSchemeNumberByDemandCode
(
qobj
,
t
){
var
setobj
=
{
"scheme_number"
:
qobj
.
schemeNumber
};
var
whereobj
=
{
"demand_code"
:
qobj
.
businessMode
};
...
...
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