|
1
2
3
4
|
package com.order.erp.controller;
import com.order.erp.common.constant.ServerResult;
import com.order.erp.domain.OrderStatusEnum;
|
|
5
|
import com.order.erp.domain.dto.order.QuerySalesStatisticeDO;
|
|
6
|
import com.order.erp.domain.vo.IndexDataVO;
|
|
7
|
import com.order.erp.domain.vo.order.DateTimeVO;
|
|
8
9
10
11
|
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;
|
|
12
13
|
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
|
|
14
15
16
17
18
|
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;
|
|
19
20
|
import java.util.List;
import java.util.Map;
|
|
21
22
23
24
25
26
27
28
|
/**
* @author zhongnanhuang
* @version 1.0
* @project order-erp
* @description 首页
* @date 2023/10/23 16:44:55
*/
|
|
29
|
@Api(tags = "首页")
|
|
30
31
32
33
34
35
36
|
@RestController
@RequestMapping("/order/erp/index")
public class IndexController {
@Resource
OrderBaseInfoService orderBaseInfoService;
@GetMapping("/data")
|
|
37
|
@ApiOperation("首页统计数据")
|
|
38
|
public ServerResult getData(DateTimeVO dateTimeVO){ return orderBaseInfoService.countByYear(dateTimeVO);}
|
|
39
|
|
|
40
41
42
43
44
45
46
|
@GetMapping("/chartData")
@ApiOperation("首页订单趋势")
public ServerResult getChartData(DateTimeVO dateTimeVO){
//订单趋势数据
// List<Map<String,Integer>> chartData = orderBaseInfoService.countDaysOrder();
return orderBaseInfoService.countByDate(dateTimeVO);
}
|
|
47
|
|
|
48
49
50
51
52
53
|
@GetMapping("/totalSalesStatistics")
@ApiOperation("销售额完成情况")
public ServerResult totalSalesStatistics(QuerySalesStatisticeDO querySalesStatisticeDO){
//订单趋势数据
Map<String, String> chartData = orderBaseInfoService.totalSalesStatistics(querySalesStatisticeDO);
return ServerResult.success(chartData);
|
|
54
|
}
|
|
55
|
|
|
56
57
58
|
@GetMapping("/salesStatusEveryCustomer")
@ApiOperation("每个客户销售额情况")
public ServerResult salesStatusEveryCustomer(QuerySalesStatisticeDO querySalesStatisticeDO){
|
|
59
|
//订单趋势数据
|
|
60
|
Map<String, Map<String, Double>> chartData = orderBaseInfoService.salesStatusEveryCustomer(querySalesStatisticeDO);
|
|
61
62
|
return ServerResult.success(chartData);
}
|
|
63
|
}
|