package com.dsk.web.controller.dsk;

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.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 = "招标偏好信息（openApi）")
    @PostMapping(value = "bidDataGroup")
    public R bidDataGroup(@RequestBody @Valid EnterpriseBidDataGroupBody vo) throws Exception {
        return enterpriseService.bidDataGroup(vo);
    }

    @ApiOperation(value = "甲方业绩数据（openApi）")
    @PostMapping(value = "projectTenderDataGroup")
    public R projectTenderDataGroup(@RequestBody @Valid EnterpriseProjectTenderDataGroupBody vo) throws Exception {
        return enterpriseService.projectTenderDataGroup(vo);
    }

    @ApiOperation(value = "股东列表（openApi）")
    @PostMapping(value = "partners")
    public TableDataInfo partners(@RequestBody @Valid EnterprisePartnersBody vo) throws Exception {
        return enterpriseService.partners(vo);
    }

    @ApiOperation(value = "对外投资列表（openApi）")
    @PostMapping(value = "investment")
    public TableDataInfo investment(@RequestBody @Valid EnterpriseInvestmentBody vo) throws Exception {
        return enterpriseService.investment(vo);
    }

    @ApiOperation(value = "分支机构列表（openApi）")
    @PostMapping(value = "affiliates")
    public TableDataInfo affiliates(@RequestBody @Valid EnterpriseAffiliatesBody vo) throws Exception {
        return enterpriseService.affiliates(vo);
    }

    @ApiOperation(value = "企业动态列表（建设库）")
    @PostMapping(value = "dynamicPage")
    public TableDataInfo dynamicPage(@RequestBody @Valid EnterpriseDynamicPageBody vo) throws Exception {
        return enterpriseService.dynamicPage(vo);
    }

    @ApiOperation(value = "工商基本信息（openApi）")
    @PostMapping(value = "icInfo")
    public R icInfo(@RequestBody @Valid EnterpriseIcInfoBody vo) throws Exception {
        return enterpriseService.icInfo(vo);
    }

    @ApiOperation(value = "工商变更信息列表（openApi）")
    @PostMapping(value = "changeInfo")
    public TableDataInfo changeInfo(@RequestBody @Valid EnterpriseChangeInfoBody vo) throws Exception {
        return enterpriseService.changeInfo(vo);
    }

    @ApiOperation(value = "高管信息列表（openApi）")
    @PostMapping(value = "keymembers")
    public TableDataInfo keymembers(@RequestBody @Valid EnterpriseKeymembersBody vo) throws Exception {
        return enterpriseService.keymembers(vo);
    }

    @ApiOperation(value = "工商股东信息（openApi）")
    @PostMapping(value = "bestStockPage")
    public TableDataInfo bestStockPage(@RequestBody @Valid EnterpriseKeymembersBody vo) throws Exception {
        return enterpriseService.bestStockPage(vo);
    }

    @ApiOperation(value = "财务简析（openApi）")
    @PostMapping(value = "financial")
    public R financial(@RequestBody @Valid EnterpriseFinancialBody vo) throws Exception {
        return enterpriseService.financial(vo);
    }

    @ApiOperation(value = "城投平台企业查询（openApi）")
    @PostMapping(value = "uipSerach")
    public TableDataInfo uipSerach(@RequestBody @Valid EnterpriseUipSearchBody vo) throws Exception {
        return enterpriseService.uipSerach(vo);
    }

    @ApiOperation(value = "城投平台企业查询选项（openApi）")
    @PostMapping(value = "uipGroupData")
    public R financial() throws Exception {
        return enterpriseService.uipGroupData();
    }

}
