Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
1c417dfa
Commit
1c417dfa
authored
Oct 17, 2022
by
季圣华
Browse files
优化 查询存在欠款的单据接口
parent
d117bd30
Changes
2
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4List.java
View file @
1c417dfa
...
...
@@ -37,6 +37,10 @@ public class DepotHeadVo4List extends DepotHead{
private
BigDecimal
finishDeposit
;
private
BigDecimal
needDebt
;
private
BigDecimal
debt
;
public
String
getProjectName
()
{
return
projectName
;
}
...
...
@@ -156,4 +160,20 @@ public class DepotHeadVo4List extends DepotHead{
public
void
setFinishDeposit
(
BigDecimal
finishDeposit
)
{
this
.
finishDeposit
=
finishDeposit
;
}
public
BigDecimal
getNeedDebt
()
{
return
needDebt
;
}
public
void
setNeedDebt
(
BigDecimal
needDebt
)
{
this
.
needDebt
=
needDebt
;
}
public
BigDecimal
getDebt
()
{
return
debt
;
}
public
void
setDebt
(
BigDecimal
debt
)
{
this
.
debt
=
debt
;
}
}
\ No newline at end of file
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
1c417dfa
...
...
@@ -1019,7 +1019,18 @@ public class DepotHeadService {
if
(
dh
.
getOperTime
()
!=
null
)
{
dh
.
setOperTimeStr
(
getCenternTime
(
dh
.
getOperTime
()));
}
dh
.
setFinishDebt
(
accountItemService
.
getEachAmountByBillId
(
dh
.
getId
()));
BigDecimal
discountLastMoney
=
dh
.
getDiscountLastMoney
()!=
null
?
dh
.
getDiscountLastMoney
():
BigDecimal
.
ZERO
;
BigDecimal
otherMoney
=
dh
.
getOtherMoney
()!=
null
?
dh
.
getOtherMoney
():
BigDecimal
.
ZERO
;
BigDecimal
deposit
=
dh
.
getDeposit
()!=
null
?
dh
.
getDeposit
():
BigDecimal
.
ZERO
;
BigDecimal
changeAmount
=
dh
.
getChangeAmount
()!=
null
?
dh
.
getChangeAmount
():
BigDecimal
.
ZERO
;
//欠款
dh
.
setNeedDebt
(
discountLastMoney
.
add
(
otherMoney
).
subtract
(
deposit
.
add
(
changeAmount
)));
BigDecimal
finishDebt
=
accountItemService
.
getEachAmountByBillId
(
dh
.
getId
());
finishDebt
=
finishDebt
!=
null
?
finishDebt:
BigDecimal
.
ZERO
;
//已收欠款
dh
.
setFinishDebt
(
finishDebt
);
//待收欠款
dh
.
setDebt
(
discountLastMoney
.
add
(
otherMoney
).
subtract
(
deposit
.
add
(
changeAmount
).
add
(
finishDebt
)));
dh
.
setMaterialsList
(
findMaterialsListByHeaderId
(
dh
.
getId
()));
resList
.
add
(
dh
);
}
...
...
Write
Preview
Supports
Markdown
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