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
c16a8845
Commit
c16a8845
authored
Dec 23, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出货阶段的订单信息修改都不对订单产品价格进行重置计算
parent
2031c168
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
21 deletions
+19
-21
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+19
-21
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 @
c16a8845
...
...
@@ -2032,19 +2032,19 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
LinkedList
<
ApplyInfoVO
>
applyInfoList
=
new
LinkedList
<>();
// 通用信息比较
this
.
compareGenericForms
(
updateReqVO
,
vo
,
applyInfoList
);
this
.
compareGenericForms
(
updateReqVO
,
vo
,
isShipment
,
applyInfoList
);
// 空运信息比较
if
(
Objects
.
equals
(
updateReqVO
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
())
||
Objects
.
equals
(
updateReqVO
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_SEA_COMBINED_TRANSPORT
.
getValue
()))
{
// 空运需要设置空运相关信息
this
.
compareAirInfo
(
updateReqVO
,
vo
,
applyInfoList
);
this
.
compareAirInfo
(
updateReqVO
,
vo
,
isShipment
,
applyInfoList
);
}
if
((
Objects
.
equals
(
vo
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
())
||
Objects
.
equals
(
vo
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_SEA_COMBINED_TRANSPORT
.
getValue
()))
&&
(!
Objects
.
equals
(
updateReqVO
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_FREIGHT_LINE
.
getValue
())
&&
!
Objects
.
equals
(
updateReqVO
.
getTransportId
(),
TransportTypeShortEnum
.
AIR_SEA_COMBINED_TRANSPORT
.
getValue
())))
{
// 原订单是空运,当前改为非空运则要清空空运相关设置信息
this
.
compareClearAirInfo
(
updateReqVO
,
vo
,
applyInfoList
);
this
.
compareClearAirInfo
(
updateReqVO
,
vo
,
isShipment
,
applyInfoList
);
}
// 线路信息比较
this
.
compareLine
(
updateReqVO
,
vo
,
applyInfoList
,
logisticsInfoDto
);
this
.
compareLine
(
updateReqVO
,
vo
,
isShipment
,
applyInfoList
,
logisticsInfoDto
);
// 比较发货人信息
CustomerContactsDO
consignorContactsDO
=
customerContactsService
.
getCustomerContacts
(
updateReqVO
.
getConsignorContactsId
());
...
...
@@ -2054,7 +2054,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
consignorContactsDO
))
{
consignorDO
=
customerService
.
getById
(
consignorContactsDO
.
getCustomerId
());
if
(
Objects
.
nonNull
(
consignorDO
))
{
//
TODO 非控货订单是否
必须有收货人
//
非控货订单
必须有收货人
if
(
vo
.
getIsCargoControl
()
&&
vo
.
getHasConsignee
()
!=
hasConsignee
)
{
ApplyInfoVO
infoVO
=
new
ApplyInfoVO
();
infoVO
.
setName
(
"控货订单是否有无收货人"
);
...
...
@@ -2067,7 +2067,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
orderConsignorBackVO
.
setCustomerNumber
(
consignorDO
.
getNumber
());
}
this
.
compareConsignorInfo
(
updateReqVO
,
consignorContactsDO
,
orderConsignorBackVO
,
applyInfoList
,
vo
);
this
.
compareConsignorInfo
(
updateReqVO
,
consignorContactsDO
,
orderConsignorBackVO
,
applyInfoList
,
vo
,
isShipment
);
}
vo
.
setConsignorVO
(
orderConsignorBackVO
);
// 比较收货人信息
...
...
@@ -2101,7 +2101,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
if
(
Objects
.
nonNull
(
consigneeContactsDO
))
{
this
.
compareConsigneeInfo
(
updateReqVO
,
consigneeContactsDO
,
orderConsigneeBackVO
,
applyInfoList
,
vo
,
dictDataRespDTO
);
this
.
compareConsigneeInfo
(
updateReqVO
,
consigneeContactsDO
,
orderConsigneeBackVO
,
applyInfoList
,
vo
,
dictDataRespDTO
,
isShipment
);
}
}
else
{
// 控货订单发货人设置为控货无收货人,这里需要处理掉订单的收货人信息
...
...
@@ -2228,8 +2228,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
private
void
compareClearAirInfo
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
List
<
ApplyInfoVO
>
applyInfoList
)
{
private
void
compareClearAirInfo
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
boolean
isShipment
,
List
<
ApplyInfoVO
>
applyInfoList
)
{
ApplyInfoVO
infoVO
;
// 目的港清关
if
(
Objects
.
nonNull
(
vo
.
getPortDestCustomsClear
())
&&
vo
.
getPortDestCustomsClear
()
!=
0
)
{
...
...
@@ -2329,7 +2328,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
private
void
compareAirInfo
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
List
<
ApplyInfoVO
>
applyInfoList
)
{
private
void
compareAirInfo
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
boolean
isShipment
,
List
<
ApplyInfoVO
>
applyInfoList
)
{
ApplyInfoVO
infoVO
;
// 目的港清关
...
...
@@ -2452,7 +2451,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
* @param vo 原订单数据
* @param applyInfoList 变更详情记录
*/
private
void
compareLine
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
List
<
ApplyInfoVO
>
applyInfoList
,
LogisticsInfoDto
logisticsInfoDto
)
{
private
void
compareLine
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
boolean
isShipment
,
List
<
ApplyInfoVO
>
applyInfoList
,
LogisticsInfoDto
logisticsInfoDto
)
{
ApplyInfoVO
infoVO
;
// 原线路信息
LogisticsInfoDto
orgLogisticsInfoDto
=
vo
.
getLogisticsInfoDto
();
...
...
@@ -2559,7 +2558,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
// 线路变动肯定要重新计价
vo
.
setIsResetPrice
(
true
);
vo
.
setIsResetPrice
(
!
isShipment
);
}
vo
.
setChannelId
(
Objects
.
isNull
(
vo
.
getChannelId
())
?
0L
:
vo
.
getChannelId
());
...
...
@@ -2585,12 +2584,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
applyInfoList
.
add
(
infoVO
);
vo
.
setChannelId
(
updateReqVO
.
getChannelId
());
// 线路变动肯定要重新计价
vo
.
setIsResetPrice
(
true
);
vo
.
setIsResetPrice
(
!
isShipment
);
}
}
private
void
compareConsignorInfo
(
OrderUpdateReqVO
updateReqVO
,
CustomerContactsDO
consignorContactsDO
,
OrderConsignorBackVO
orderConsignorBackVO
,
List
<
ApplyInfoVO
>
applyInfoList
,
OrderBackVO
vo
)
{
OrderConsignorBackVO
orderConsignorBackVO
,
List
<
ApplyInfoVO
>
applyInfoList
,
OrderBackVO
vo
,
boolean
isShipment
)
{
// 验证该订单是否有核销应收
receivableService
.
verificationReceivableIsWriteOff
(
vo
.
getOrderId
(),
null
);
...
...
@@ -2672,7 +2671,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsignorBackVO
.
setIsCharge
(
true
);
// 重新定价
// 重新定价
vo
.
setIsResetPrice
(
true
);
vo
.
setIsResetPrice
(
!
isShipment
);
vo
.
setConsignorVO
(
orderConsignorBackVO
);
}
...
...
@@ -2680,7 +2679,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
private
void
compareConsigneeInfo
(
OrderUpdateReqVO
updateReqVO
,
CustomerContactsDO
consigneeContactsDO
,
OrderConsigneeBackVO
orderConsigneeBackVO
,
List
<
ApplyInfoVO
>
applyInfoList
,
OrderBackVO
vo
,
DictDataRespDTO
dictDataRespDTO
)
{
OrderBackVO
vo
,
DictDataRespDTO
dictDataRespDTO
,
boolean
isShipment
)
{
// 验证该订单是否有核销应收
receivableService
.
verificationReceivableIsWriteOff
(
vo
.
getOrderId
(),
null
);
ApplyInfoVO
infoVO
;
...
...
@@ -2763,7 +2762,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 收货人信息有变动
orderConsigneeBackVO
.
setIsCharge
(
true
);
// 重新定价
vo
.
setIsResetPrice
(
true
);
vo
.
setIsResetPrice
(
!
isShipment
);
vo
.
setConsigneeVO
(
orderConsigneeBackVO
);
}
...
...
@@ -2863,8 +2862,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
}
private
void
compareGenericForms
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
List
<
ApplyInfoVO
>
applyInfoList
)
{
private
void
compareGenericForms
(
OrderUpdateReqVO
updateReqVO
,
OrderBackVO
vo
,
boolean
isShipment
,
List
<
ApplyInfoVO
>
applyInfoList
)
{
ApplyInfoVO
infoVO
;
// 订单服务类型
if
((
StringUtils
.
isNotBlank
(
vo
.
getType
())
&&
StringUtils
.
isBlank
(
updateReqVO
.
getType
()))
||
...
...
@@ -2902,7 +2900,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
infoVO
.
setOrgValue
(
vo
.
getIsCargoControl
()
?
"是/yes"
:
"否/no"
);
infoVO
.
setNewValue
(
updateReqVO
.
getIsCargoControl
()
?
"是/yes"
:
"否/no"
);
vo
.
setIsCargoControl
(
updateReqVO
.
getIsCargoControl
());
vo
.
setIsCheckCoupon
(
Boolean
.
TRUE
);
vo
.
setIsCheckCoupon
(
!
isShipment
);
applyInfoList
.
add
(
infoVO
);
}
Map
<
Integer
,
CurrencyRespDTO
>
currencyMap
=
currencyApi
.
getAllCurrency
();
...
...
@@ -2949,7 +2947,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
infoVO
.
setOrgValue
(
vo
.
getCustomsType
()
==
1
?
"我司全代/Our full representative"
:
(
vo
.
getCustomsType
()
==
2
?
"自单代报/Self reporting"
:
"混合报关/Mixed customs declaration"
));
infoVO
.
setNewValue
(
updateReqVO
.
getCustomsType
()
==
1
?
"我司全代/Our full representative"
:
(
updateReqVO
.
getCustomsType
()
==
2
?
"自单代报/Self reporting"
:
"混合报关/Mixed customs declaration"
));
vo
.
setCustomsType
(
updateReqVO
.
getCustomsType
());
vo
.
setIsCheckCoupon
(
Boolean
.
TRUE
);
vo
.
setIsCheckCoupon
(
!
isShipment
);
applyInfoList
.
add
(
infoVO
);
}
// 出单方式
...
...
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