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
0d1713c3
Commit
0d1713c3
authored
Nov 29, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(wealth): 费用明细状态改为订单状态
parent
7c732a99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
34 deletions
+32
-34
ReceivableServiceImpl.java
...dule/wealth/service/receivable/ReceivableServiceImpl.java
+26
-29
CostDetailPageQueryVO.java
...ao/module/wealth/vo/receivable/CostDetailPageQueryVO.java
+2
-2
ReceivableMapper.xml
...src/main/resources/mapper/receivable/ReceivableMapper.xml
+4
-3
No files found.
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
View file @
0d1713c3
...
...
@@ -449,37 +449,11 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
IPage
<
CostDetailPageVO
>
costDetailPage
=
costDetailPageFuture
.
get
();
List
<
WealthMoneyAmountVO
>
searchStatistics
=
searchStatisticsFuture
.
get
();
List
<
WealthMoneyAmountVO
>
totalStatistics
=
totalStatisticsFuture
.
get
();
// 计算库中不存在的金额字段
// TODO 暂定 不含税金额 = 总金额
// 实际金额 = 含税金额 - 优惠金额
// 未核销金额 = 实际金额 - 核销金额
if
(
CollectionUtil
.
isNotEmpty
(
searchStatistics
))
{
searchStatistics
.
forEach
(
vo
->
{
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencyName
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getTitleZh
());
if
(
vo
.
getWriteOffAmount
()
==
null
)
{
vo
.
setWriteOffAmount
(
BigDecimal
.
ZERO
);
}
if
(
vo
.
getDiscountTotal
()
==
null
)
{
vo
.
setDiscountTotal
(
BigDecimal
.
ZERO
);
}
vo
.
setReceivableTotalAmount
(
vo
.
getTaxAmount
().
subtract
(
vo
.
getDiscountTotal
()));
vo
.
setNotWriteOffAmount
(
vo
.
getReceivableTotalAmount
().
subtract
(
vo
.
getWriteOffAmount
()));
});
calculateStatisticalAmount
(
allCurrency
,
searchStatistics
);
}
totalStatistics
.
forEach
(
vo
->
{
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencyName
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getTitleZh
());
if
(
vo
.
getWriteOffAmount
()
==
null
)
{
vo
.
setWriteOffAmount
(
BigDecimal
.
ZERO
);
}
if
(
vo
.
getDiscountTotal
()
==
null
)
{
vo
.
setDiscountTotal
(
BigDecimal
.
ZERO
);
}
vo
.
setNotIncludedTaxAmount
(
vo
.
getTotalAmount
());
vo
.
setReceivableTotalAmount
(
vo
.
getTaxAmount
().
subtract
(
vo
.
getDiscountTotal
()));
vo
.
setNotWriteOffAmount
(
vo
.
getReceivableTotalAmount
().
subtract
(
vo
.
getWriteOffAmount
()));
});
calculateStatisticalAmount
(
allCurrency
,
totalStatistics
);
CostDetailBackVO
.
CostDetailBackVOBuilder
voBuilder
=
CostDetailBackVO
.
builder
()
.
searchStatistics
(
searchStatistics
)
...
...
@@ -521,6 +495,29 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
return
null
;
}
/**
* 实际金额 = 含税金额 - 优惠金额
* 未核销金额 = 实际金额 - 核销金额
* TODO 暂定 不含税金额 = 总金额
* @param allCurrency
* @param statistics
*/
private
void
calculateStatisticalAmount
(
Map
<
Integer
,
CurrencyRespDTO
>
allCurrency
,
List
<
WealthMoneyAmountVO
>
statistics
)
{
statistics
.
forEach
(
vo
->
{
vo
.
setCurrencySymbol
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getFuhao
());
vo
.
setCurrencyName
(
allCurrency
.
get
(
vo
.
getCurrencyId
()).
getTitleZh
());
if
(
vo
.
getWriteOffAmount
()
==
null
)
{
vo
.
setWriteOffAmount
(
BigDecimal
.
ZERO
);
}
if
(
vo
.
getDiscountTotal
()
==
null
)
{
vo
.
setDiscountTotal
(
BigDecimal
.
ZERO
);
}
vo
.
setNotIncludedTaxAmount
(
vo
.
getTotalAmount
());
vo
.
setReceivableTotalAmount
(
vo
.
getTaxAmount
().
subtract
(
vo
.
getDiscountTotal
()));
vo
.
setNotWriteOffAmount
(
vo
.
getReceivableTotalAmount
().
subtract
(
vo
.
getWriteOffAmount
()));
});
}
@Override
public
PageResult
<
BatchGenReceiptPageVO
>
batchGenReceiptPage
(
BatchGenReceiptPageQueryVO
query
,
PageVO
page
)
{
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/CostDetailPageQueryVO.java
View file @
0d1713c3
...
...
@@ -43,6 +43,6 @@ public class CostDetailPageQueryVO {
@ApiModelProperty
(
value
=
"收款类型(字典 payment_type)(多选)"
)
private
List
<
Integer
>
collectionType
;
@ApiModelProperty
(
value
=
"
收款状态(0未收款,1收款中,2已收款)(多选)
"
)
private
Integer
stat
e
;
@ApiModelProperty
(
value
=
"
订单状态详情见字典:order_status
"
)
private
Integer
stat
us
;
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableMapper.xml
View file @
0d1713c3
...
...
@@ -8,6 +8,7 @@
o.order_no,
o.transport_id,
o.channel_id,
o.status,
de.departure_warehouse_id,
ob.objective_warehouse_id,
dew.title_zh departure_warehouse_zh,
...
...
@@ -35,7 +36,7 @@
SUM(r.discount_total) AS discount_total,
SUM(r.write_off_amount) AS write_off_amount
FROM ecw_receivable r
<if
test=
"query.transportId != null or query.shipmentChannel != null"
>
<if
test=
"query.transportId != null or query.shipmentChannel != null
or query.status != null
"
>
LEFT JOIN ecw_order o ON o.order_id = r.order_id
</if>
<if
test=
"query.departureWareHouseId != null"
>
...
...
@@ -148,8 +149,8 @@
</foreach>
</if>
</if>
<if
test=
"query.stat
e
!= null"
>
AND
r.state = #{query.state
}
<if
test=
"query.stat
us
!= null"
>
AND
o.status = #{query.status
}
</if>
</sql>
...
...
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