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
8c51d77f
Commit
8c51d77f
authored
Nov 14, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化关闭逻辑
parent
9193b921
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
icp-deliver/app/base/service/impl/delivery/deliverSve.js
+13
-7
No files found.
icp-deliver/app/base/service/impl/delivery/deliverSve.js
View file @
8c51d77f
...
...
@@ -295,15 +295,17 @@ class DeliverService extends ServiceBase {
if
(
!
deliverData
)
{
throw
new
Error
(
'查不到交付单'
);
}
// if (![system.SERVERSESTATUS.RECEIVED, system.SERVERSESTATUS.COLLECTING].includes(deliverData.delivery_status)) {
// throw new Error('该交付单状态下不可提交');
// }
// 推送 关闭交付
await
pushTx
.
pushChangeOrder
(
pushTx
.
TXSTATUS
.
CLOSED
,
deliverData
.
delivery_code
,
{
close_reason
:
pobj
.
close_reason
,
refund_close
:
deliverData
.
delivery_status
===
system
.
SERVERSESTATUS
.
SUCCESS
?
"refund_close"
:
undefined
});
// 推送 退费
await
pushTx
.
returnPremium
(
deliverData
.
delivery_code
);
// 递交材料之前 关闭 进行退费 ,后面 不退费
if
([
system
.
SERVERSESTATUS
.
RECEIVED
,
system
.
SERVERSESTATUS
.
COLLECTING
].
includes
(
deliverData
.
delivery_status
))
{
// 推送 退费
await
pushTx
.
returnPremium
(
deliverData
.
delivery_code
);
}
// 年报逻辑
let
annualReportData
;
if
(
deliverData
.
master_source_number
)
{
...
...
@@ -317,9 +319,13 @@ class DeliverService extends ServiceBase {
if
(
annualReportData
)
{
await
pushTx
.
pushChangeOrder
(
pushTx
.
TXSTATUS
.
CLOSED
,
annualReportData
.
delivery_code
,
{
close_reason
:
'对应的资质交付关闭了'
,
refund_close
:
deliverData
.
delivery_status
===
system
.
SERVERSESTATUS
.
SUCCESS
?
"refund_close"
:
undefined
});
// 推送 年报退费
await
pushTx
.
returnPremium
(
annualReportData
.
delivery_code
);
// 递交材料之前 关闭 进行退费 ,后面 不退费
if
([
system
.
SERVERSESTATUS
.
RECEIVED
,
system
.
SERVERSESTATUS
.
COLLECTING
].
includes
(
deliverData
.
delivery_status
))
{
// 推送 年报退费
await
pushTx
.
returnPremium
(
annualReportData
.
delivery_code
);
}
}
}
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
...
...
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