计算金额

This commit is contained in:
2025-10-27 21:15:30 +08:00
parent fb191b0539
commit d6c7402b11

View File

@@ -13,29 +13,28 @@ public class DistributionCenterTopVO {
/** /**
* 总收益 * 总收益
*/ */
private BigDecimal totalIncome; private String totalIncome;
/** /**
* 待入账 * 待入账
*/ */
private BigDecimal pendingIncome; private String pendingIncome;
/** /**
* 已提现 * 已提现
*/ */
private BigDecimal cashOutAmount; private String cashOutAmount;
public BigDecimal getTotalIncome() { public String getTotalIncome() {
return totalIncome == null ? BigDecimal.ZERO : totalIncome; return totalIncome == null ? "0" : totalIncome;
}
public String getPendingIncome() {
return pendingIncome == null ? "0" : pendingIncome;
} }
public BigDecimal getPendingIncome() { public String getCashOutAmount() {
return pendingIncome == null ? BigDecimal.ZERO : pendingIncome; return cashOutAmount == null ? "0" : cashOutAmount;
} }
public BigDecimal getCashOutAmount() { public String getUnCashOutAmount() {
return cashOutAmount == null ? BigDecimal.ZERO : cashOutAmount; return new BigDecimal(getTotalIncome()).subtract(new BigDecimal(getPendingIncome())).subtract(new BigDecimal(getCashOutAmount())).toString();
}
public BigDecimal getUnCashOutAmount() {
return getTotalIncome().subtract(getPendingIncome()).subtract(getCashOutAmount());
} }
} }