package com.huaxu.controller; import com.huaxu.dto.MonthRevenueDto; import com.huaxu.dto.generalView.DeviceWaterSupply; import com.huaxu.model.AjaxMessage; import com.huaxu.model.ResultStatus; import com.huaxu.service.AppPageReportService; 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; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.ArrayList; import java.util.List; /** * @description * @auto wangbo * @data 2021/3/18 10:50 */ @RestController @RequestMapping("/appPageReport") @Api(tags = "App总览报表") public class AppPageReportController { @Autowired private AppPageReportService appPageReportService; @Autowired private RevenueService revenueService; /** * 生产总览数据 * @param companyOrgId * @return */ @RequestMapping(value = "getProductionDataForSameMonth",method = RequestMethod.GET) @ApiOperation(value = "App总览——生产数据(本月)") public AjaxMessage> getProductionDataForSameMonth( @ApiParam(value = "公司id,总公司传空值") @RequestParam(required = false) Integer companyOrgId){ List result = new ArrayList(); result.addAll(appPageReportService.deviceWaterReportForSameMonth(companyOrgId,"水源",4)); result.addAll(appPageReportService.deviceWaterReportForSameMonth(companyOrgId,"水厂",3)); result.addAll(appPageReportService.deviceSellerWaterReportForSameMonth(companyOrgId)); return new AjaxMessage<>(ResultStatus.OK,result); } }