|
@@ -585,6 +585,7 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
ExpenseFlowSearch param = new ExpenseFlowSearch();
|
|
ExpenseFlowSearch param = new ExpenseFlowSearch();
|
|
|
param.setIsPaySuccess(Boolean.TRUE);
|
|
param.setIsPaySuccess(Boolean.TRUE);
|
|
|
BeanUtils.copyProperties(statisticSearch, param);
|
|
BeanUtils.copyProperties(statisticSearch, param);
|
|
|
|
|
+
|
|
|
List<String> shopOids = getSearchAllShopOid(param);
|
|
List<String> shopOids = getSearchAllShopOid(param);
|
|
|
if (ObjectUtils.isEmpty(shopOids)) {
|
|
if (ObjectUtils.isEmpty(shopOids)) {
|
|
|
return ResultContent.buildFail("请选择查询商户或所有的");
|
|
return ResultContent.buildFail("请选择查询商户或所有的");
|
|
@@ -615,6 +616,17 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
StatisticItem item = StatisticItem.builder().name(key).amount(value).build();
|
|
StatisticItem item = StatisticItem.builder().name(key).amount(value).build();
|
|
|
items.add(item);
|
|
items.add(item);
|
|
|
}
|
|
}
|
|
|
|
|
+ param.setMonth(month);
|
|
|
|
|
+ ExpenseFlowCount count = expenseFlowDao.countBuinessMainPayment(param);
|
|
|
|
|
+ statisticModel.setTotal(count.getTotal());
|
|
|
|
|
+ statisticModel.setAmount(count.getPayAmount());
|
|
|
|
|
+
|
|
|
|
|
+ if (month > 1) {
|
|
|
|
|
+ param.setMonth(month - 1);
|
|
|
|
|
+ count = expenseFlowDao.countBuinessMainPayment(param);
|
|
|
|
|
+ statisticModel.setPreTotal(count.getTotal());
|
|
|
|
|
+ statisticModel.setPreAmount(count.getPayAmount());
|
|
|
|
|
+ }
|
|
|
} else if (statisticType == StatisticType.Week) {
|
|
} else if (statisticType == StatisticType.Week) {
|
|
|
// 按月
|
|
// 按月
|
|
|
int week = DateUtils.getCurrentWeekInYear();
|
|
int week = DateUtils.getCurrentWeekInYear();
|
|
@@ -627,11 +639,21 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
StatisticItem item = StatisticItem.builder().name(key).amount(value).build();
|
|
StatisticItem item = StatisticItem.builder().name(key).amount(value).build();
|
|
|
items.add(item);
|
|
items.add(item);
|
|
|
}
|
|
}
|
|
|
|
|
+ param.setWeek(week);
|
|
|
|
|
+ ExpenseFlowCount count = expenseFlowDao.countBuinessMainPayment(param);
|
|
|
|
|
+ statisticModel.setTotal(count.getTotal());
|
|
|
|
|
+ statisticModel.setAmount(count.getPayAmount());
|
|
|
|
|
+
|
|
|
|
|
+ if (week > 1) {
|
|
|
|
|
+ param.setWeek(week - 1);
|
|
|
|
|
+ count = expenseFlowDao.countBuinessMainPayment(param);
|
|
|
|
|
+ statisticModel.setPreTotal(count.getTotal());
|
|
|
|
|
+ statisticModel.setPreAmount(count.getPayAmount());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
statisticModel.setItems(items);
|
|
statisticModel.setItems(items);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
return ResultContent.buildSuccess(statisticModel);
|
|
return ResultContent.buildSuccess(statisticModel);
|
|
|
}
|
|
}
|
|
|
|
|
|