Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
郑小冰
/
orthopedics
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ef459b6a
authored
Nov 14, 2019
by
ice
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改销售订单退货成功时状态为退货退款
parent
1e448084
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
src/main/java/orthopedics/controller/bookcity/WshShipmentController.java
src/main/java/orthopedics/controller/bookcity/WshShipmentController.java
View file @
ef459b6a
...
@@ -61,8 +61,12 @@ public class WshShipmentController {
...
@@ -61,8 +61,12 @@ public class WshShipmentController {
public
Result
createShip
(
@RequestBody
WshShipmentHeaderPage
wshShipmentHeaderPage
,
public
Result
createShip
(
@RequestBody
WshShipmentHeaderPage
wshShipmentHeaderPage
,
@RequestParam
(
value
=
"status"
,
required
=
true
)
String
status
,
@RequestParam
(
value
=
"status"
,
required
=
true
)
String
status
,
@RequestParam
(
value
=
"token"
,
required
=
true
)
String
token
){
@RequestParam
(
value
=
"token"
,
required
=
true
)
String
token
){
SalOrderHeader
salOrderHeader
=
salOrderHeaderService
.
findSalOrderById
(
wshShipmentHeaderPage
.
getSourceHeaderId
());
if
(
salOrderHeader
==
null
){
return
new
Result
(
false
,
StatusCode
.
ERROR
,
"该销售订单不存在,请刷新!"
);
}
//判断销售订单是否是已审批状态
//判断销售订单是否是已审批状态
if
(!
"approval"
.
equals
(
status
))
{
if
(!
"approval"
.
equals
(
status
)
||
!
"approval"
.
equals
(
salOrderHeader
.
getHeaderStatus
())
)
{
throw
ErrorEnum
.
NotAllowStatusERROR
.
createException
(
wshShipmentHeaderPage
.
getSourceHeaderNumber
());
//返回状态不对
throw
ErrorEnum
.
NotAllowStatusERROR
.
createException
(
wshShipmentHeaderPage
.
getSourceHeaderNumber
());
//返回状态不对
}
}
//检查accesstoken的有效性
//检查accesstoken的有效性
...
@@ -120,8 +124,12 @@ public class WshShipmentController {
...
@@ -120,8 +124,12 @@ public class WshShipmentController {
public
Result
createReceive
(
@RequestBody
RcvReceiptHeaderPage
rcvReceiptHeaderPage
,
public
Result
createReceive
(
@RequestBody
RcvReceiptHeaderPage
rcvReceiptHeaderPage
,
@RequestParam
(
value
=
"status"
,
required
=
true
)
String
status
,
@RequestParam
(
value
=
"status"
,
required
=
true
)
String
status
,
@RequestParam
(
value
=
"token"
,
required
=
true
)
String
token
){
@RequestParam
(
value
=
"token"
,
required
=
true
)
String
token
){
//判断销售订单是否是已审批状态
SalOrderHeader
salOrderHeader
=
salOrderHeaderService
.
findSalOrderById
(
rcvReceiptHeaderPage
.
getSourceHeaderId
());
if
(!
"approval"
.
equals
(
status
))
{
if
(
salOrderHeader
==
null
){
return
new
Result
(
false
,
StatusCode
.
ERROR
,
"该销售订单不存在,请刷新!"
);
}
//判断销售订单是否是已完成状态
if
(!
"completed"
.
equals
(
status
)
||
!
"completed"
.
equals
(
salOrderHeader
.
getHeaderStatus
()))
{
throw
ErrorEnum
.
NotAllowStatusERROR
.
createException
(
rcvReceiptHeaderPage
.
getSourceHeaderNumber
());
//返回状态不对
throw
ErrorEnum
.
NotAllowStatusERROR
.
createException
(
rcvReceiptHeaderPage
.
getSourceHeaderNumber
());
//返回状态不对
}
}
//检查accesstoken的有效性
//检查accesstoken的有效性
...
@@ -155,9 +163,9 @@ public class WshShipmentController {
...
@@ -155,9 +163,9 @@ public class WshShipmentController {
BeanUtils
.
copyProperties
(
rcvReceiptHeaderPage
,
rcvReceiptHeader
);
BeanUtils
.
copyProperties
(
rcvReceiptHeaderPage
,
rcvReceiptHeader
);
//增加
//增加
rcvReceiptHeaderService
.
saveMain
(
rcvReceiptHeader
,
rcvReceiptHeaderPage
.
getRcvReceiptLineList
());
rcvReceiptHeaderService
.
saveMain
(
rcvReceiptHeader
,
rcvReceiptHeaderPage
.
getRcvReceiptLineList
());
//修改销售订单的状态为已
完成completed
//修改销售订单的状态为已
退货退款
salOrderLineService
.
updateSalOrderLineStatus
(
updateBy
,
updateTime
,
"
complete
d"
,
rcvReceiptHeader
.
getSourceHeaderId
());
salOrderLineService
.
updateSalOrderLineStatus
(
updateBy
,
updateTime
,
"
refun
d"
,
rcvReceiptHeader
.
getSourceHeaderId
());
boolean
headerTrue
=
salOrderHeaderService
.
updateOrderHeaderStatus
(
updateBy
,
updateTime
,
"
complete
d"
,
rcvReceiptHeader
.
getSourceHeaderId
());
boolean
headerTrue
=
salOrderHeaderService
.
updateOrderHeaderStatus
(
updateBy
,
updateTime
,
"
refun
d"
,
rcvReceiptHeader
.
getSourceHeaderId
());
if
(!
headerTrue
){
if
(!
headerTrue
){
throw
ErrorEnum
.
Error
.
createException
(
"销售订单的状态修改失败"
);
throw
ErrorEnum
.
Error
.
createException
(
"销售订单的状态修改失败"
);
}
}
...
...
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