fix: 账户收支统计,功能优化。
This commit is contained in:
@@ -1964,8 +1964,8 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
|
|||||||
double balance =0;
|
double balance =0;
|
||||||
//支出总额
|
//支出总额
|
||||||
double totalOutcome =0;
|
double totalOutcome =0;
|
||||||
//收益总额
|
//投资亏损
|
||||||
double totalIncome =0;
|
double investOutcome =0;
|
||||||
//刷卡手续费 13
|
//刷卡手续费 13
|
||||||
double posExpenses =0;
|
double posExpenses =0;
|
||||||
//信用卡分期利息 14
|
//信用卡分期利息 14
|
||||||
@@ -1974,14 +1974,13 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
|
|||||||
double onLineInterest=0;
|
double onLineInterest=0;
|
||||||
//日常支出 1
|
//日常支出 1
|
||||||
double dailyExpenses=0;
|
double dailyExpenses=0;
|
||||||
//投资收益 2
|
//投资盈利 2
|
||||||
double investIncome=0;
|
double investIncome=0;
|
||||||
//工资收入 11
|
//工资收入 11
|
||||||
double salaryIncome=0;
|
double salaryIncome=0;
|
||||||
for (AccountsDealRecordVo vo:accountsDealRecordVoList
|
for (AccountsDealRecordVo vo:accountsDealRecordVoList
|
||||||
) {
|
) {
|
||||||
if(vo.getDealType().equals("1")){
|
if(vo.getDealType().equals("1")){
|
||||||
totalIncome+=vo.getAmount();
|
|
||||||
if(vo.getDealCategory().equals("11")){
|
if(vo.getDealCategory().equals("11")){
|
||||||
salaryIncome+=vo.getAmount();
|
salaryIncome+=vo.getAmount();
|
||||||
}
|
}
|
||||||
@@ -1991,12 +1990,15 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
|
|||||||
}
|
}
|
||||||
//支出
|
//支出
|
||||||
if(vo.getDealType().equals("2")){
|
if(vo.getDealType().equals("2")){
|
||||||
totalOutcome+=vo.getAmount();
|
//非投资支出
|
||||||
|
if(!vo.getDealCategory().equals("2")){
|
||||||
|
totalOutcome+=vo.getAmount();
|
||||||
|
}
|
||||||
if(vo.getDealCategory().equals("1")){
|
if(vo.getDealCategory().equals("1")){
|
||||||
dailyExpenses+=vo.getAmount();
|
dailyExpenses+=vo.getAmount();
|
||||||
}
|
}
|
||||||
if(vo.getDealCategory().equals("2")){
|
if(vo.getDealCategory().equals("2")){
|
||||||
investIncome-=vo.getAmount();
|
investOutcome+=vo.getAmount();
|
||||||
}
|
}
|
||||||
if(vo.getDealCategory().equals("13")){
|
if(vo.getDealCategory().equals("13")){
|
||||||
posExpenses+=vo.getAmount();
|
posExpenses+=vo.getAmount();
|
||||||
@@ -2010,11 +2012,11 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//收支差额
|
//收支差额
|
||||||
map.put("balance",decimalFormat.format(totalIncome-totalOutcome));
|
map.put("balance",decimalFormat.format(investIncome+salaryIncome-totalOutcome-investOutcome));
|
||||||
//支出总额
|
//非投资收益支出总额
|
||||||
map.put("totalOutcome",decimalFormat.format(totalOutcome));
|
map.put("totalOutcome",decimalFormat.format(totalOutcome));
|
||||||
//收益总额
|
//投资亏损
|
||||||
map.put("totalIncome",decimalFormat.format(totalIncome));
|
map.put("investOutcome",decimalFormat.format(investOutcome));
|
||||||
//刷卡手续费 13
|
//刷卡手续费 13
|
||||||
map.put("posExpenses",decimalFormat.format(posExpenses));
|
map.put("posExpenses",decimalFormat.format(posExpenses));
|
||||||
//信用卡分期利息 14
|
//信用卡分期利息 14
|
||||||
@@ -2028,7 +2030,7 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
|
|||||||
//工资收入 11
|
//工资收入 11
|
||||||
map.put("salaryIncome",decimalFormat.format(salaryIncome));
|
map.put("salaryIncome",decimalFormat.format(salaryIncome));
|
||||||
//非日常支出 1
|
//非日常支出 1
|
||||||
map.put("notDailyExpenses",decimalFormat.format(totalOutcome-dailyExpenses));
|
map.put("notDailyExpenses",decimalFormat.format(onLineInterest+creditInterest+posExpenses));
|
||||||
|
|
||||||
List<AccountsDealRecordVo> queryList =new ArrayList<>();
|
List<AccountsDealRecordVo> queryList =new ArrayList<>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user