package com.order.erp.controller; import com.order.erp.common.constant.ServerResult; import com.order.erp.domain.OrderStatusEnum; import com.order.erp.domain.dto.order.QuerySalesStatisticeDO; import com.order.erp.domain.vo.IndexDataVO; import com.order.erp.domain.vo.order.DateTimeVO; import com.order.erp.service.order.OrderBaseInfoService; import com.order.erp.service.order.OrderCompletionReportService; import com.order.erp.service.order.OrderInspectionStageService; import com.order.erp.service.order.OrderProfitAnalysisService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; import java.util.Map; /** * @author zhongnanhuang * @version 1.0 * @project order-erp * @description 首页 * @date 2023/10/23 16:44:55 */ @Api(tags = "首页") @RestController @RequestMapping("/order/erp/index") public class IndexController { @Resource OrderBaseInfoService orderBaseInfoService; @GetMapping("/data") @ApiOperation("首页统计数据") public ServerResult getData(DateTimeVO dateTimeVO){ return orderBaseInfoService.countByYear(dateTimeVO);} @GetMapping("/chartData") @ApiOperation("首页订单趋势") public ServerResult getChartData(DateTimeVO dateTimeVO){ //订单趋势数据 // List<Map<String,Integer>> chartData = orderBaseInfoService.countDaysOrder(); return orderBaseInfoService.countByDate(dateTimeVO); } @GetMapping("/totalSalesStatistics") @ApiOperation("销售额完成情况") public ServerResult totalSalesStatistics(QuerySalesStatisticeDO querySalesStatisticeDO){ //订单趋势数据 Map<String, String> chartData = orderBaseInfoService.totalSalesStatistics(querySalesStatisticeDO); return ServerResult.success(chartData); } @GetMapping("/salesStatusEveryCustomer") @ApiOperation("每个客户销售额情况") public ServerResult salesStatusEveryCustomer(QuerySalesStatisticeDO querySalesStatisticeDO){ //订单趋势数据 Map<String, Map<String, Double>> chartData = orderBaseInfoService.salesStatusEveryCustomer(querySalesStatisticeDO); return ServerResult.success(chartData); } }