StatisticalReportController.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.service.impl.StatisticalReportImpl;
  3. import com.steerinfo.dil.util.BaseRESTfulController;
  4. import com.steerinfo.dil.util.ColumnDataUtil;
  5. import com.steerinfo.dil.util.PageListAdd;
  6. import com.steerinfo.framework.controller.RESTfulResult;
  7. import com.steerinfo.framework.service.pagehelper.PageHelper;
  8. import io.swagger.annotations.ApiImplicitParam;
  9. import io.swagger.annotations.ApiImplicitParams;
  10. import io.swagger.annotations.ApiOperation;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.PostMapping;
  13. import org.springframework.web.bind.annotation.RequestBody;
  14. import org.springframework.web.bind.annotation.RequestMapping;
  15. import org.springframework.web.bind.annotation.RestController;
  16. import java.util.HashMap;
  17. import java.util.List;
  18. import java.util.Map;
  19. /**
  20. * @ author :TXF
  21. * @ time :2021/12/14 18:05
  22. */
  23. @RestController
  24. @RequestMapping("/${api.version}/statisticalReport")
  25. public class StatisticalReportController extends BaseRESTfulController {
  26. @Autowired
  27. StatisticalReportImpl statisticalReportService;
  28. @Autowired
  29. ColumnDataUtil columnDataUtil;
  30. @ApiOperation(value="查询辅料燃料统计报表")
  31. @ApiImplicitParams({
  32. @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
  33. @ApiImplicitParam(name = "apiId(220)", value = "动态表头", required = false, dataType = "Integer"),
  34. @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
  35. @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
  36. @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
  37. })
  38. @PostMapping("/getRLFLReport")
  39. public RESTfulResult getRLFLReport(@RequestBody(required=false) Map<String,Object> mapValue,
  40. Integer apiId,
  41. Integer pageNum,
  42. Integer pageSize,
  43. Integer orderType
  44. ){
  45. mapValue.put("orderTypee", orderType);
  46. List<Map<String, Object>> allReport = statisticalReportService.getAllPurchaseFLRLReport(mapValue);
  47. PageHelper.startPage(pageNum, pageSize);
  48. //分页数据
  49. List<Map<String, Object>> report = statisticalReportService.getRLFLReport(mapValue);
  50. PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allReport,report);
  51. return success(pageList);
  52. }
  53. }