package com.dsk.web.controller.dsk;

import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.domain.model.*;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.system.dskService.IndexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


/**
 * @ClassName IndexController
 * @Description TODO
 * @Author Dgm
 * @Date 2023/8/15 12:01
 * @Version 1.0
 */
@Api("首页数据相关")
@RestController
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private IndexService enterpriseService;

    @ApiOperation(value = "大项目最新中标")
    @PostMapping(value = "bigWinningBidsPage")
    public AjaxResult bigWinningBidsPage(@RequestBody JSONObject object) throws Exception {
        return enterpriseService.bigWinningBidsPage(object);
    }

    @ApiOperation(value = "大项目最新招标")
    @PostMapping(value = "bigBidPage")
    public AjaxResult bigBidPage(@RequestBody JSONObject object) throws Exception {
        return enterpriseService.bigBidPage(object);
    }

    @ApiOperation(value = "集团中标统计")
    @PostMapping("/countByCompany")
    public AjaxResult countByCompany(@RequestBody JSONObject object) {
        return enterpriseService.countByCompany(object);
    }

    @ApiOperation(value = "建筑企业中标排行榜")
    @PostMapping("/bidRank")
    public AjaxResult bidRank(@RequestBody JSONObject object) {
        return enterpriseService.bidRank(object);
    }
}
