|
@@ -1,5 +1,6 @@
|
|
|
package com.huaxu.controller;
|
|
|
|
|
|
+import com.huaxu.dto.MonthRevenueDto;
|
|
|
import com.huaxu.dto.generalView.DeviceWaterSupply;
|
|
|
import com.huaxu.dto.generalView.WaterSupplyChart;
|
|
|
import com.huaxu.dto.homePage.CompanyCount;
|
|
@@ -9,6 +10,7 @@ import com.huaxu.dto.homePage.WaterQualityRateForScene;
|
|
|
import com.huaxu.model.AjaxMessage;
|
|
|
import com.huaxu.model.ResultStatus;
|
|
|
import com.huaxu.service.HomePageReportService;
|
|
|
+import com.huaxu.service.RevenueService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -32,6 +34,8 @@ public class HomePageReportController {
|
|
|
|
|
|
@Autowired
|
|
|
private HomePageReportService homePageReportService;
|
|
|
+ @Autowired
|
|
|
+ private RevenueService revenueService;
|
|
|
|
|
|
@RequestMapping(value = "getDeviceWaterIntake",method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "综合展示——取水图表(近6月)")
|
|
@@ -53,7 +57,12 @@ public class HomePageReportController {
|
|
|
@ApiOperation(value = "综合展示——公司资源统计")
|
|
|
public AjaxMessage<CompanyCount> getCompanyResouces(
|
|
|
@ApiParam(value = "公司id,总公司传空值") @RequestParam(required = false) Integer companyOrgId){
|
|
|
- return new AjaxMessage<>(ResultStatus.OK,homePageReportService.countSceneByType(companyOrgId));
|
|
|
+ CompanyCount result=homePageReportService.countSceneByType(companyOrgId);
|
|
|
+ List<MonthRevenueDto> monthRevenue = revenueService.selectMonthRevenue(companyOrgId,1);
|
|
|
+ if(monthRevenue!=null&&monthRevenue.size()>0){
|
|
|
+ result.setWaterMeter(monthRevenue.get(0).getUserMeterCount());
|
|
|
+ }
|
|
|
+ return new AjaxMessage<>(ResultStatus.OK,result);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "getDeviceWaterAmount",method = RequestMethod.GET)
|