package com.dsk.web.controller.dsk;

import com.dsk.common.core.domain.R;
import com.dsk.common.core.domain.model.EnterpriseBidDataGroupBody;
import com.dsk.common.core.domain.model.EnterpriseInfoHeaderBody;
import com.dsk.common.core.domain.model.EnterpriseStatisticBody;
import com.dsk.common.core.domain.model.EnterpriseSupplierPageBody;
import com.dsk.system.dskService.EnterpriseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;


/**
 * @ClassName EnterpriseController
 * @Description TODO
 * @Author zhangyi
 * @Date 2023/5/15 12:01
 * @Version 1.0
 */
@Api("企业数据相关")
@RestController
@RequestMapping("/enterprise")
public class EnterpriseController {

    @Autowired
    private EnterpriseService enterpriseService;

    @ApiOperation(value = "企业详情头部信息")
    @PostMapping("/infoHeader")
    public R infoHeader(@RequestBody @Valid EnterpriseInfoHeaderBody body) throws Exception
    {
        return enterpriseService.infoHeader(body);
    }

    @ApiOperation(value = "企业统计信息")
    @PostMapping(value = "statistic")
    public R statistic(@RequestBody @Valid EnterpriseStatisticBody vo) throws Exception {
        return enterpriseService.statistic(vo);
    }

    @ApiOperation(value = "招标偏好信息")
    @PostMapping(value = "bidDataGroup")
    public R bidDataGroup(@RequestBody @Valid EnterpriseBidDataGroupBody vo) throws Exception {
        return enterpriseService.bidDataGroup(vo);
    }

    @ApiOperation(value = "供应商列表")
    @PostMapping(value = "supplierPage")
    public R supplierPage(@RequestBody @Valid EnterpriseSupplierPageBody vo) throws Exception {
        return enterpriseService.supplierPage(vo);
    }
}
