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
bf510deb
Commit
bf510deb
authored
Jan 17, 2025
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改自编号应收报表统计与代码格式化
parent
b7436ae7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
57 deletions
+32
-57
OrderQueryServiceImpl.java
...odule/order/service/order/impl/OrderQueryServiceImpl.java
+32
-57
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
View file @
bf510deb
...
...
@@ -2603,8 +2603,14 @@ public class OrderQueryServiceImpl implements OrderQueryService {
totalNetReceiptsAdvanceOtherFeeGroupDtoMap
.
put
(
currencyId
,
netReceiptsFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
}
if
(!
Objects
.
equals
(
currencyId
,
collectOtherFeeId
))
{
ExchangeRateRespDTO
otherRateRespDTO
=
currencyApi
.
getCurrencyRate
(
currencyId
,
collectOtherFeeId
);
totalNetReceiptsAdvanceOtherFee
=
totalNetReceiptsAdvanceOtherFee
.
add
(
netReceiptsFee
.
multiply
(
otherRateRespDTO
.
getCurrencyRate
()));
}
else
{
totalNetReceiptsAdvanceOtherFee
=
totalNetReceiptsAdvanceOtherFee
.
add
(
netReceiptsFee
);
}
if
(!
Objects
.
equals
(
currencyId
,
collectAssistantOtherFeeId
))
{
ExchangeRateRespDTO
assistantOtherRateRespDTO
=
currencyApi
.
getCurrencyRate
(
currencyId
,
collectAssistantOtherFeeId
);
totalNetReceiptsAdvance
OtherFee
=
totalNetReceiptsAdvance
OtherFee
.
add
(
netReceiptsFee
.
multiply
(
assistantOtherRateRespDTO
.
getCurrencyRate
()));
totalNetReceiptsAdvance
AssistantOtherFee
=
totalNetReceiptsAdvanceAssistant
OtherFee
.
add
(
netReceiptsFee
.
multiply
(
assistantOtherRateRespDTO
.
getCurrencyRate
()));
}
else
{
totalNetReceiptsAdvanceAssistantOtherFee
=
totalNetReceiptsAdvanceAssistantOtherFee
.
add
(
netReceiptsFee
);
}
...
...
@@ -2617,12 +2623,17 @@ public class OrderQueryServiceImpl implements OrderQueryService {
totalNetReceiptsCollectOtherFeeGroupDtoMap
.
put
(
currencyId
,
netReceiptsFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
}
if
(!
Objects
.
equals
(
currencyId
,
collectOtherFeeId
))
{
ExchangeRateRespDTO
otherRateRespDTO
=
currencyApi
.
getCurrencyRate
(
currencyId
,
collectOtherFeeId
);
totalNetReceiptsCollectOtherFee
=
totalNetReceiptsCollectOtherFee
.
add
(
netReceiptsFee
.
multiply
(
otherRateRespDTO
.
getCurrencyRate
()));
}
else
{
totalNetReceiptsCollectOtherFee
=
totalNetReceiptsCollectOtherFee
.
add
(
netReceiptsFee
);
}
if
(!
Objects
.
equals
(
currencyId
,
collectAssistantOtherFeeId
))
{
ExchangeRateRespDTO
assistantOtherRateRespDTO
=
currencyApi
.
getCurrencyRate
(
currencyId
,
collectAssistantOtherFeeId
);
totalNetReceiptsCollect
OtherFee
=
totalNetReceiptsCollec
tOtherFee
.
add
(
netReceiptsFee
.
multiply
(
assistantOtherRateRespDTO
.
getCurrencyRate
()));
totalNetReceiptsCollect
AssistantOtherFee
=
totalNetReceiptsCollectAssistan
tOtherFee
.
add
(
netReceiptsFee
.
multiply
(
assistantOtherRateRespDTO
.
getCurrencyRate
()));
}
else
{
totalNetReceiptsCollectAssistantOtherFee
=
totalNetReceiptsCollectAssistantOtherFee
.
add
(
netReceiptsFee
);
}
}
}
}
...
...
@@ -2680,9 +2691,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 订单总优惠分组
StringBuilder
discountTotalFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
discountTotalFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
receivableTotalFeeGroupDtoMap
,
netReceiptsTotalFeeGroupDtoMap
,
discountTotalFeeGroupDtoList
,
discountTotalFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
receivableTotalFeeGroupDtoMap
,
netReceiptsTotalFeeGroupDtoMap
,
discountTotalFeeGroupDtoList
,
discountTotalFeeGroup
);
summaryDto
.
setDiscountTotalFeeGroupDtoList
(
discountTotalFeeGroupDtoList
);
summaryDto
.
setDiscountTotalFeeGroup
(
discountTotalFeeGroup
.
toString
());
// 总费用换算成美元设置的货币单位的总应收、总实收、总优惠
...
...
@@ -2695,35 +2704,27 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 应收运费分组
StringBuilder
receivableFreightFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
receivableFreightFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableFreightFeeGroupDtoMap
,
receivableFreightFeeGroupDtoList
,
receivableFreightFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableFreightFeeGroupDtoMap
,
receivableFreightFeeGroupDtoList
,
receivableFreightFeeGroup
);
summaryDto
.
setReceivableFreightFeeGroupDtoList
(
receivableFreightFeeGroupDtoList
);
summaryDto
.
setReceivableFreightFeeGroup
(
receivableFreightFeeGroup
.
toString
());
// 实收运费分组
StringBuilder
netReceiptsFreightFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsFreightFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsFreightFeeGroupDtoMap
,
netReceiptsFreightFeeGroupDtoList
,
netReceiptsFreightFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsFreightFeeGroupDtoMap
,
netReceiptsFreightFeeGroupDtoList
,
netReceiptsFreightFeeGroup
);
summaryDto
.
setNetReceiptsFreightFeeGroupDtoList
(
netReceiptsFreightFeeGroupDtoList
);
summaryDto
.
setNetReceiptsFreightFeeGroup
(
netReceiptsFreightFeeGroup
.
toString
());
// 实收到付运费分组
StringBuilder
netReceiptsCollectFreightFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsCollectFreightFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsCollectFreightFeeGroupDtoMap
,
netReceiptsCollectFreightFeeGroupDtoList
,
netReceiptsCollectFreightFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsCollectFreightFeeGroupDtoMap
,
netReceiptsCollectFreightFeeGroupDtoList
,
netReceiptsCollectFreightFeeGroup
);
summaryDto
.
setNetReceiptsCollectFreightFeeGroupDtoList
(
netReceiptsCollectFreightFeeGroupDtoList
);
summaryDto
.
setNetReceiptsCollectFreightFeeGroup
(
netReceiptsCollectFreightFeeGroup
.
toString
());
// 实收预付运费分组
StringBuilder
netReceiptsAdvanceFreightFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsAdvanceFreightFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsAdvanceFreightFeeGroupDtoMap
,
netReceiptsAdvanceFreightFeeGroupDtoList
,
netReceiptsAdvanceFreightFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsAdvanceFreightFeeGroupDtoMap
,
netReceiptsAdvanceFreightFeeGroupDtoList
,
netReceiptsAdvanceFreightFeeGroup
);
summaryDto
.
setNetReceiptsAdvanceFreightFeeGroupDtoList
(
netReceiptsAdvanceFreightFeeGroupDtoList
);
summaryDto
.
setNetReceiptsAdvanceFreightFeeGroup
(
netReceiptsAdvanceFreightFeeGroup
.
toString
());
...
...
@@ -2739,34 +2740,26 @@ public class OrderQueryServiceImpl implements OrderQueryService {
summaryDto
.
setTotalNetReceiptsAdvanceFreightFee
(
totalNetReceiptsAdvanceFreightFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
summaryDto
.
setTotalReceivableFreightFee
(
totalReceivableFreightFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
summaryDto
.
setTotalNetReceiptsFreightFee
(
totalNetReceiptsFreightFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
summaryDto
.
setDiscountFreightFee
(
summaryDto
.
getTotalReceivableFreightFee
().
subtract
(
summaryDto
.
getTotalNetReceiptsFreightFee
()));
summaryDto
.
setDiscountFreightFee
(
summaryDto
.
getTotalReceivableFreightFee
().
subtract
(
summaryDto
.
getTotalNetReceiptsFreightFee
()));
// 清关费
// 应收清关费分组
StringBuilder
receivableClearanceFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
receivableClearanceFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableClearanceFeeGroupDtoMap
,
receivableClearanceFeeGroupDtoList
,
receivableClearanceFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableClearanceFeeGroupDtoMap
,
receivableClearanceFeeGroupDtoList
,
receivableClearanceFeeGroup
);
summaryDto
.
setReceivableClearanceFeeGroupDtoList
(
receivableClearanceFeeGroupDtoList
);
summaryDto
.
setReceivableClearanceFeeGroup
(
receivableClearanceFeeGroup
.
toString
());
// 实收清关费分组
StringBuilder
netReceiptsClearanceFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsClearanceFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsClearanceFeeGroupDtoMap
,
netReceiptsClearanceFeeGroupDtoList
,
netReceiptsClearanceFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsClearanceFeeGroupDtoMap
,
netReceiptsClearanceFeeGroupDtoList
,
netReceiptsClearanceFeeGroup
);
summaryDto
.
setNetReceiptsClearanceFeeGroupDtoList
(
netReceiptsClearanceFeeGroupDtoList
);
summaryDto
.
setNetReceiptsClearanceFeeGroup
(
netReceiptsClearanceFeeGroup
.
toString
());
// 实收到付清关费分组
StringBuilder
netReceiptsCollectClearanceFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsCollectClearanceFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsCollectClearanceFeeGroupDtoMap
,
netReceiptsCollectClearanceFeeGroupDtoList
,
netReceiptsCollectClearanceFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsCollectClearanceFeeGroupDtoMap
,
netReceiptsCollectClearanceFeeGroupDtoList
,
netReceiptsCollectClearanceFeeGroup
);
summaryDto
.
setNetReceiptsCollectClearanceFeeGroupDtoList
(
netReceiptsCollectClearanceFeeGroupDtoList
);
summaryDto
.
setNetReceiptsCollectClearanceFeeGroup
(
netReceiptsCollectClearanceFeeGroup
.
toString
());
...
...
@@ -2774,18 +2767,14 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 实收预付清关费分组
StringBuilder
netReceiptsAdvanceClearanceFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsAdvanceClearanceFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsAdvanceClearanceFeeGroupDtoMap
,
netReceiptsAdvanceClearanceFeeGroupDtoList
,
netReceiptsAdvanceClearanceFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsAdvanceClearanceFeeGroupDtoMap
,
netReceiptsAdvanceClearanceFeeGroupDtoList
,
netReceiptsAdvanceClearanceFeeGroup
);
summaryDto
.
setNetReceiptsAdvanceClearanceFeeGroupDtoList
(
netReceiptsAdvanceClearanceFeeGroupDtoList
);
summaryDto
.
setNetReceiptsAdvanceClearanceFeeGroup
(
netReceiptsAdvanceClearanceFeeGroup
.
toString
());
// 清关费优惠分组
StringBuilder
discountClearanceFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
discountClearanceFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableClearanceFeeGroupDtoMap
,
totalNetReceiptsClearanceFeeGroupDtoMap
,
discountClearanceFeeGroupDtoList
,
discountClearanceFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableClearanceFeeGroupDtoMap
,
totalNetReceiptsClearanceFeeGroupDtoMap
,
discountClearanceFeeGroupDtoList
,
discountClearanceFeeGroup
);
summaryDto
.
setDiscountClearanceFeeGroupDtoList
(
discountClearanceFeeGroupDtoList
);
summaryDto
.
setDiscountClearanceFeeGroup
(
discountClearanceFeeGroup
.
toString
());
// 清关费换算成目的地设置的货币单位的总应收、总实收、总优惠
...
...
@@ -2794,52 +2783,40 @@ public class OrderQueryServiceImpl implements OrderQueryService {
summaryDto
.
setTotalReceivableClearanceFee
(
totalReceivableClearanceFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
summaryDto
.
setTotalNetReceiptsClearanceFee
(
totalNetReceiptsClearanceFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
summaryDto
.
setDiscountClearanceFee
(
totalReceivableClearanceFee
.
subtract
(
totalNetReceiptsClearanceFee
));
summaryDto
.
setDiscountClearanceFee
(
summaryDto
.
getTotalReceivableClearanceFee
().
subtract
(
summaryDto
.
getTotalNetReceiptsClearanceFee
()));
summaryDto
.
setDiscountClearanceFee
(
summaryDto
.
getTotalReceivableClearanceFee
().
subtract
(
summaryDto
.
getTotalNetReceiptsClearanceFee
()));
// 额外费用
// 应收额外费用分组
StringBuilder
receivableOtherFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
receivableOtherFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableOtherFeeGroupDtoMap
,
receivableOtherFeeGroupDtoList
,
receivableOtherFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableOtherFeeGroupDtoMap
,
receivableOtherFeeGroupDtoList
,
receivableOtherFeeGroup
);
summaryDto
.
setReceivableOtherFeeGroupDtoList
(
receivableOtherFeeGroupDtoList
);
summaryDto
.
setReceivableOtherFeeGroup
(
receivableOtherFeeGroup
.
toString
());
// 实收额外费用分组
StringBuilder
netReceiptsOtherFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsOtherFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsOtherFeeGroupDtoMap
,
netReceiptsOtherFeeGroupDtoList
,
netReceiptsOtherFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsOtherFeeGroupDtoMap
,
netReceiptsOtherFeeGroupDtoList
,
netReceiptsOtherFeeGroup
);
summaryDto
.
setNetReceiptsOtherFeeGroupDtoList
(
netReceiptsOtherFeeGroupDtoList
);
summaryDto
.
setNetReceiptsOtherFeeGroup
(
netReceiptsOtherFeeGroup
.
toString
());
// 实收到付额外费用分组
StringBuilder
netReceiptsCollectOtherFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsCollectOtherFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsCollectOtherFeeGroupDtoMap
,
netReceiptsCollectOtherFeeGroupDtoList
,
netReceiptsCollectOtherFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsCollectOtherFeeGroupDtoMap
,
netReceiptsCollectOtherFeeGroupDtoList
,
netReceiptsCollectOtherFeeGroup
);
summaryDto
.
setNetReceiptsCollectOtherFeeGroupDtoList
(
netReceiptsCollectOtherFeeGroupDtoList
);
summaryDto
.
setNetReceiptsCollectOtherFeeGroup
(
netReceiptsCollectOtherFeeGroup
.
toString
());
// 实收预付额外费用分组
StringBuilder
netReceiptsAdvanceOtherFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
netReceiptsAdvanceOtherFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsAdvanceOtherFeeGroupDtoMap
,
netReceiptsAdvanceOtherFeeGroupDtoList
,
netReceiptsAdvanceOtherFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalNetReceiptsAdvanceOtherFeeGroupDtoMap
,
netReceiptsAdvanceOtherFeeGroupDtoList
,
netReceiptsAdvanceOtherFeeGroup
);
summaryDto
.
setNetReceiptsAdvanceOtherFeeGroupDtoList
(
netReceiptsAdvanceOtherFeeGroupDtoList
);
summaryDto
.
setNetReceiptsAdvanceOtherFeeGroup
(
netReceiptsAdvanceOtherFeeGroup
.
toString
());
// 额外费用优惠分组
StringBuilder
discountOtherFeeGroup
=
new
StringBuilder
();
List
<
FeeGroupDto
>
discountOtherFeeGroupDtoList
=
new
ArrayList
<>();
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableOtherFeeGroupDtoMap
,
totalNetReceiptsOtherFeeGroupDtoMap
,
discountOtherFeeGroupDtoList
,
discountOtherFeeGroup
);
this
.
convertFeeGroup
(
currencyRespDTOMap
,
totalReceivableOtherFeeGroupDtoMap
,
totalNetReceiptsOtherFeeGroupDtoMap
,
discountOtherFeeGroupDtoList
,
discountOtherFeeGroup
);
summaryDto
.
setDiscountOtherFeeGroupDtoList
(
discountOtherFeeGroupDtoList
);
summaryDto
.
setDiscountOtherFeeGroup
(
discountOtherFeeGroup
.
toString
());
// 额外费用换算成目的地设置的货币单位的总应收、总实收、总优惠
...
...
@@ -2849,9 +2826,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
summaryDto
.
setTotalNetReceiptsAdvanceAssistantOtherFee
(
totalNetReceiptsAdvanceAssistantOtherFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
summaryDto
.
setTotalReceivableOtherFee
(
totalReceivableOtherFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
summaryDto
.
setTotalNetReceiptsOtherFee
(
totalNetReceiptsOtherFee
.
setScale
(
0
,
RoundingMode
.
HALF_UP
));
summaryDto
.
setDiscountOtherFee
(
summaryDto
.
getTotalReceivableOtherFee
().
subtract
(
summaryDto
.
getTotalNetReceiptsOtherFee
()));
summaryDto
.
setDiscountOtherFee
(
summaryDto
.
getTotalReceivableOtherFee
().
subtract
(
summaryDto
.
getTotalNetReceiptsOtherFee
()));
return
summaryDto
;
}
...
...
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