package cn.com.ty.lift.system.homepage.controller;

import cn.com.ty.lift.system.homepage.dao.dto.request.DataStatisticsRequest;
import cn.com.ty.lift.system.homepage.service.EnterpriseDataStatisticsService;
import cn.com.xwy.boot.web.dto.RestResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author huangyuan
 * @date 2020/4/24
 * @description 企业数据统计
 */
@RestController
@RequestMapping("/home/enterprise/statistics")
public class EnterpriseDataStatisticsController {

    @Resource
    private EnterpriseDataStatisticsService enterpriseDataStatisticsService;

    /**
     * @param dataStatisticsRequest 请求数据 公司id
     * @return 年份对应业务数据
     * @description 获取年度业务统计数据
     * @date 2020/4/24 10:27 上午
     */
    @RequestMapping("/yearBusinessData")
    public RestResponse yearBusinessData(@RequestBody DataStatisticsRequest dataStatisticsRequest) {
        return enterpriseDataStatisticsService.yearBusinessData(dataStatisticsRequest);
    }
}
