Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
47ae92cb
Commit
47ae92cb
authored
Oct 20, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
控货订单无收货人的逻辑bug修复
parent
169544ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+22
-6
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
47ae92cb
...
@@ -698,8 +698,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -698,8 +698,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeService
.
save
(
orderConsigneeDO
);
orderConsigneeService
.
save
(
orderConsigneeDO
);
}
else
{
}
else
{
// 控货订单没有收货人则不限制修改收货人
// 控货订单没有收货人则不限制修改收货人
if
(
order
.
getIsCargoControl
()
&&
!
hasConsignee
)
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
}
else
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
order
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
}
}
}
if
(!
Objects
.
equals
(
createReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
if
(!
Objects
.
equals
(
createReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
//customerType 发货人-1 收货人 2
//customerType 发货人-1 收货人 2
int
customerType
=
this
.
checkOrderSalesman
(
order
,
createReqVO
.
getOfferId
(),
null
,
null
,
orderConsignorDO
,
orderConsigneeDO
);
int
customerType
=
this
.
checkOrderSalesman
(
order
,
createReqVO
.
getOfferId
(),
null
,
null
,
orderConsignorDO
,
orderConsigneeDO
);
...
@@ -948,8 +952,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -948,8 +952,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
}
else
{
}
else
{
// 控货订单没有收货人则不限制修改收货人
// 控货订单没有收货人则不限制修改收货人
if
(
order
.
getIsCargoControl
()
&&
!
hasConsignee
)
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
}
else
{
order
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
order
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
}
}
}
if
(!
Objects
.
equals
(
createReqVO
.
getStatus
(),
if
(!
Objects
.
equals
(
createReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
DRAFT
.
getValue
()))
{
// 发货人 1 收货人 2
// 发货人 1 收货人 2
...
@@ -3307,13 +3315,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3307,13 +3315,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeService
.
saveOrUpdate
(
orderConsigneeDO
);
orderConsigneeService
.
saveOrUpdate
(
orderConsigneeDO
);
}
else
{
}
else
{
// 如果控货订单发货人设置了控货无收货人,则需要删除订单已有收货人
// 如果控货订单发货人设置了控货无收货人,则需要删除订单已有收货人
if
(
Objects
.
nonNull
(
orderConsigneeDO
))
{
if
(
Objects
.
nonNull
(
orderConsigneeDO
)
&&
!
hasConsignee
)
{
orderConsigneeService
.
removeById
(
orderConsigneeDO
.
getId
());
orderConsigneeService
.
removeById
(
orderConsigneeDO
.
getId
());
orderConsigneeDO
=
null
;
orderConsigneeDO
=
null
;
}
}
// 控货订单没有收货人则不限制修改收货人
// 控货订单没有收货人则不限制修改收货人
if
(
updateObj
.
getIsCargoControl
()
&&
!
hasConsignee
)
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
}
else
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
}
}
}
if
(!
Objects
.
equals
(
updateReqVO
.
getStatus
(),
if
(!
Objects
.
equals
(
updateReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
DRAFT
.
getValue
()))
{
...
@@ -3570,14 +3582,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3570,14 +3582,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
}
else
{
}
else
{
// 如果控货订单发货人设置了控货无收货人,则需要删除订单已有收货人
// 如果控货订单发货人设置了控货无收货人,则需要删除订单已有收货人
if
(
Objects
.
nonNull
(
orderConsigneeDO
))
{
if
(
Objects
.
nonNull
(
orderConsigneeDO
)
&&
!
hasConsignee
)
{
orderConsigneeService
.
removeById
(
orderConsigneeDO
.
getId
());
orderConsigneeService
.
removeById
(
orderConsigneeDO
.
getId
());
orderConsigneeDO
=
null
;
orderConsigneeDO
=
null
;
}
}
consigneeDO
=
null
;
consigneeDO
=
null
;
// 控货订单没有收货人则不限制修改收货人
// 控货订单没有收货人则不限制修改收货人
if
(
updateObj
.
getIsCargoControl
()
&&
!
hasConsignee
)
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
TRUE
);
}
else
{
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
updateObj
.
setIsLimitUpdateConsignee
(
Boolean
.
FALSE
);
}
}
}
if
(!
Objects
.
equals
(
updateReqVO
.
getStatus
(),
if
(!
Objects
.
equals
(
updateReqVO
.
getStatus
(),
DRAFT
.
getValue
()))
{
DRAFT
.
getValue
()))
{
//customerType 发货人 1 收货人 2
//customerType 发货人 1 收货人 2
...
...
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