|
@@ -75,10 +75,13 @@ public class AppPageReportServiceImpl implements AppPageReportService {
|
|
|
|
|
|
@Override
|
|
|
public List<DeviceWaterSupply> deviceSellerWaterReportForSameMonth(Integer companyOrgId) {
|
|
|
+ BigDecimal AmountCountMonth = null;
|
|
|
LocalDate localDate = LocalDate.now();
|
|
|
List<DeviceWaterSupply> deviceWaterSupplies = new ArrayList<DeviceWaterSupply>();
|
|
|
- List<MonthRevenueDto> result = revenueService.selectMonthRevenue(companyOrgId, localDate.getMonthValue());
|
|
|
- BigDecimal AmountCountMonth = new BigDecimal(result.get(0).getMeterReadingUsage());
|
|
|
+ List<MonthRevenueDto> sellerWater = revenueService.selectMonthRevenue(companyOrgId, localDate.getMonthValue());
|
|
|
+ if(sellerWater.size()>0){
|
|
|
+ AmountCountMonth = new BigDecimal(sellerWater.get(0).getMeterReadingUsage());
|
|
|
+ }
|
|
|
DeviceWaterSupply deviceWaterSupplyMonth = new DeviceWaterSupply();
|
|
|
deviceWaterSupplyMonth.setOrderNo(1);
|
|
|
deviceWaterSupplyMonth.setAmount(AmountCountMonth != null ? AmountCountMonth.divide(new BigDecimal("10000")) : BigDecimal.ZERO);
|