|
|
@@ -434,8 +434,8 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
|
|
|
public void getNatureOrderData(GroupsDataStatisticsView groupsDataStatisticsView, String startDate, String endDate) {
|
|
|
List<NatureOrderDataDto> orderDataList = statisticsExportMapper.getGroupsOrderData(startDate, endDate);
|
|
|
- orderDataList.forEach(data->{
|
|
|
- BigDecimal money = Optional.ofNullable(data.getMoney()).orElse(BigDecimal.ZERO);
|
|
|
+ orderDataList.forEach(data -> {
|
|
|
+ BigDecimal money = data.getMoney();
|
|
|
if (data.getType() == 1) {
|
|
|
groupsDataStatisticsView.setNatureMoney(money);
|
|
|
return;
|
|
|
@@ -448,6 +448,15 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
groupsDataStatisticsView.setChannelMoney(money);
|
|
|
}
|
|
|
});
|
|
|
+ if (groupsDataStatisticsView.getNatureMoney() == null) {
|
|
|
+ groupsDataStatisticsView.setNatureMoney(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if (groupsDataStatisticsView.getPersonalMoney() == null) {
|
|
|
+ groupsDataStatisticsView.setPersonalMoney(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if (groupsDataStatisticsView.getChannelMoney() == null) {
|
|
|
+ groupsDataStatisticsView.setChannelMoney(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void getCategoryOrderData(GroupsDataStatisticsView groupsDataStatisticsView, String startDate, String endDate) {
|