AppPageReportController.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package com.huaxu.controller;
  2. import com.huaxu.dto.MonthRevenueDto;
  3. import com.huaxu.dto.generalView.DeviceWaterSupply;
  4. import com.huaxu.model.AjaxMessage;
  5. import com.huaxu.model.ResultStatus;
  6. import com.huaxu.service.AppPageReportService;
  7. import com.huaxu.service.HomePageReportService;
  8. import com.huaxu.service.RevenueService;
  9. import io.swagger.annotations.Api;
  10. import io.swagger.annotations.ApiOperation;
  11. import io.swagger.annotations.ApiParam;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RequestMethod;
  15. import org.springframework.web.bind.annotation.RequestParam;
  16. import org.springframework.web.bind.annotation.RestController;
  17. import java.util.ArrayList;
  18. import java.util.List;
  19. /**
  20. * @description
  21. * @auto wangbo
  22. * @data 2021/3/18 10:50
  23. */
  24. @RestController
  25. @RequestMapping("/appPageReport")
  26. @Api(tags = "App总览报表")
  27. public class AppPageReportController {
  28. @Autowired
  29. private AppPageReportService appPageReportService;
  30. @Autowired
  31. private RevenueService revenueService;
  32. /**
  33. * 生产总览数据
  34. * @param companyOrgId
  35. * @return
  36. */
  37. @RequestMapping(value = "getProductionDataForSameMonth",method = RequestMethod.GET)
  38. @ApiOperation(value = "App总览——生产数据(本月)")
  39. public AjaxMessage<List<DeviceWaterSupply>> getProductionDataForSameMonth(
  40. @ApiParam(value = "公司id,总公司传空值") @RequestParam(required = false) Integer companyOrgId){
  41. List<DeviceWaterSupply> result = new ArrayList<DeviceWaterSupply>();
  42. result.addAll(appPageReportService.deviceWaterReportForSameMonth(companyOrgId,"水源",4));
  43. result.addAll(appPageReportService.deviceWaterReportForSameMonth(companyOrgId,"水厂",3));
  44. result.addAll(appPageReportService.deviceSellerWaterReportForSameMonth(companyOrgId));
  45. return new AjaxMessage<>(ResultStatus.OK,appPageReportService.deviceWaterReportForSameMonth(companyOrgId,"水源",4));
  46. }
  47. }