package com.dsk.web.controller.search;

import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.dtos.ComposeQueryDto;
import com.dsk.web.controller.search.service.MarketAnalysisService;
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 Administrator
 *
 */
@RequestMapping("/marketAnalysis")
@RestController
public class MarketAnalysisController {


    @Resource
    MarketAnalysisService marketAnalysisService;

    /*
     * 各省份备案企业数量
     */
    @RequestMapping("/areaGroupByProvince")
    public AjaxResult areaGroupByProvince() {

        return marketAnalysisService.areaGroupByProvince();
    }

    /*
     * 资质等级按照大类、等级类型分组
     */
    @RequestMapping("/certGroupByCategoryAndLevel")
    public AjaxResult certGroupByCategoryAndLevel() {

        return marketAnalysisService.certGroupByCategoryAndLevel();
    }


    /*
     * 资质等级按照小类、等级类型分组
     */
    @RequestMapping("/certGroupByTypeAndLevel")
    public AjaxResult certGroupByTypeAndLevel() {

        return marketAnalysisService.certGroupByTypeAndLevel();
    }


    /*
     * 资质等级按照大类、省份、等级类型分组
     */
    @RequestMapping("/certGroupByCategoryProvinceLevel")
    public AjaxResult certGroupByCategoryProvinceLevel() {

        return marketAnalysisService.certGroupByCategoryProvinceLevel();
    }

    /*
     * 中标数量按省份分组
     */
    @RequestMapping("/countGroupByProvince")
    public AjaxResult countGroupByProvince(@RequestBody ComposeQueryDto compose) {
        return marketAnalysisService.countGroupByProvince(compose);
    }

    /*
     * 中标数量按月份分组
     */
    @RequestMapping("/countGroupByMonth")
    public AjaxResult countGroupByMonth(@RequestBody ComposeQueryDto compose) {
        return marketAnalysisService.countGroupByMonth(compose);
    }
}
