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
bfea29bf
Commit
bfea29bf
authored
Aug 03, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abolishIcpProgrammeByNeed
parent
7d17f035
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletions
+46
-1
center-order/app/base/service/impl/dbneed/needsolutionSve.js
+46
-1
No files found.
center-order/app/base/service/impl/dbneed/needsolutionSve.js
View file @
bfea29bf
...
@@ -416,7 +416,52 @@ class NeedsolutionService extends ServiceBase {
...
@@ -416,7 +416,52 @@ class NeedsolutionService extends ServiceBase {
await
this
.
dao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
needNo
:
needinfo
.
needNo
}
});
//方案废弃
await
this
.
dao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
needNo
:
needinfo
.
needNo
}
});
//方案废弃
return
system
.
getResultSuccess
();
return
system
.
getResultSuccess
();
}
}
//根据需求关闭ICP方案(关闭需求后调用)
async
abolishIcpProgrammeByNeed
(
pobj
)
{
var
ab
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
if
(
!
app
||
!
app
.
uapp_id
)
{
return
system
.
getResultFail
(
-
100
,
"未知渠道"
);
}
if
(
!
ab
.
intentionBizId
)
{
return
system
.
getResultFail
(
-
101
,
"需求编号不能为空"
);
}
//获取需求信息
var
needinfo
=
await
this
.
needinfoDao
.
model
.
findOne
({
attributes
:[
"id"
,
"status"
,
"statusName"
,
"needNo"
],
where
:
{
channelNeedNo
:
ab
.
intentionBizId
},
raw
:
true
});
if
(
!
needinfo
||
!
needinfo
.
id
)
{
return
system
.
getResultFail
(
-
201
,
"未知需求信息"
);
}
if
(
needinfo
.
status
==
"ygb"
)
{
return
system
.
getResultFail
(
-
202
,
"该方案需求状态为"
+
needinfo
.
statusName
+
",不能执行此操作"
);
}
//获取方案信息
var
ns
=
await
this
.
dao
.
model
.
findAll
({
where
:
{
needNo
:
needinfo
.
needNo
,
isInvalid
:
0
},
raw
:
true
});
for
(
var
i
=
0
;
i
<
ns
.
length
;
i
++
)
{
var
fa
=
ns
[
i
];
if
(
fa
.
status
==
"ywc"
)
{
return
system
.
getResultFail
(
-
103
,
"方案状态错误,不能废弃已完成方案"
);
}
var
flowStatus
=
fa
.
solutionContent
&&
fa
.
solutionContent
.
status
?
fa
.
solutionContent
.
status
:
""
;
if
(
flowStatus
&&
[
"GXB_REFUSE"
,
"CLOSE"
].
indexOf
(
flowStatus
)
<
0
){
return
system
.
getResultFail
(
-
104
,
"⽅案状态为关闭或不予受理才可关闭需求"
);
}
}
var
self
=
this
;
return
await
this
.
db
.
transaction
(
async
function
(
t
)
{
var
needObj
=
{
id
:
needinfo
.
id
,
status
:
"ygb"
,
notes
:
ab
.
note
};
await
self
.
needinfoDao
.
update
(
needObj
,
t
);
//关闭需求
await
self
.
dao
.
model
.
update
({
status
:
"yzf"
,
isInvalid
:
1
},
{
where
:
{
needNo
:
needinfo
.
needNo
,
isInvalid
:
0
},
transaction
:
t
});
//方案废弃
return
system
.
getResultSuccess
();
})
}
//立即支付下单保存方案
//立即支付下单保存方案
async
createSolutionByOrder
(
pobj
)
{
async
createSolutionByOrder
(
pobj
)
{
var
ab
=
pobj
.
actionBody
;
var
ab
=
pobj
.
actionBody
;
...
...
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