package com.dsk.jsk.controller;

import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.jsk.domain.*;
import com.dsk.jsk.service.EnterpriseService;
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 javax.validation.Valid;
import java.util.List;


/**
 * @ClassName EnterpriseController
 * @Description TODO
 * @Author zhangyi
 * @Date 2023/5/15 12:01
 * @Version 1.0
 */
@RestController
@RequestMapping("/enterprise")
public class EnterpriseController {

    @Autowired
    private EnterpriseService enterpriseService;


    @PostMapping("/label")
    public R label(@RequestBody @Valid EnterpriseInfoLabelBody body) throws Exception {
        return enterpriseService.label(body);
    }

    @PostMapping("/infoHeader")
    public R infoHeader(@RequestBody @Valid EnterpriseInfoHeaderBody body) throws Exception {
        return enterpriseService.infoHeader(body);
    }

    @PostMapping(value = "statistic")
    public R statistic(@RequestBody @Valid EnterpriseStatisticBody vo) throws Exception {
        return enterpriseService.statistic(vo);
    }

    @PostMapping(value = "bidDataGroup")
    public R bidDataGroup(@RequestBody @Valid EnterpriseBidDataGroupBody vo) throws Exception {
        return enterpriseService.bidDataGroup(vo);
    }

    @PostMapping(value = "projectTenderDataGroup")
    public R projectTenderDataGroup(@RequestBody @Valid EnterpriseProjectTenderDataGroupBody vo) throws Exception {
        return enterpriseService.projectTenderDataGroup(vo);
    }

    @PostMapping(value = "partners")
    public TableDataInfo partners(@RequestBody @Valid EnterprisePartnersBody vo) throws Exception {
        return enterpriseService.partners(vo);
    }

    @PostMapping(value = "investment")
    public TableDataInfo investment(@RequestBody @Valid EnterpriseInvestmentBody vo) throws Exception {
        return enterpriseService.investment(vo);
    }

    @PostMapping(value = "affiliates")
    public TableDataInfo affiliates(@RequestBody @Valid EnterpriseAffiliatesBody vo) throws Exception {
        return enterpriseService.affiliates(vo);
    }

    @PostMapping(value = "dynamicPage")
    public TableDataInfo dynamicPage(@RequestBody @Valid EnterpriseDynamicPageBody vo) throws Exception {
        return enterpriseService.dynamicPage(vo);
    }

    @PostMapping(value = "icInfo")
    public R icInfo(@RequestBody @Valid EnterpriseIcInfoBody vo) throws Exception {
        return enterpriseService.icInfo(vo);
    }

    @PostMapping(value = "changeInfo")
    public TableDataInfo changeInfo(@RequestBody @Valid EnterpriseChangeInfoBody vo) throws Exception {
        return enterpriseService.changeInfo(vo);
    }

    @PostMapping(value = "keymembers")
    public TableDataInfo keymembers(@RequestBody @Valid EnterpriseKeymembersBody vo) throws Exception {
        return enterpriseService.keymembers(vo);
    }

    @PostMapping(value = "bestStockPage")
    public TableDataInfo bestStockPage(@RequestBody @Valid EnterpriseBestStockPageBody vo) throws Exception {
        return enterpriseService.bestStockPage(vo);
    }

    @PostMapping(value = "financial")
    public R financial(@RequestBody @Valid EnterpriseFinancialBody vo) throws Exception {
        return enterpriseService.financial(vo);
    }

    @PostMapping(value = "uipSerach")
    public TableDataInfo uipSerach(@RequestBody @Valid EnterpriseUipSearchBody vo) throws Exception {
        return enterpriseService.uipSerach(vo);
    }

    @PostMapping(value = "uipGroupData")
    public R financial() throws Exception {
        return enterpriseService.uipGroupData();
    }

    @PostMapping(value = "remark")
    public R remark(@RequestBody @Valid EnterpriseRemarkBody vo) throws Exception {
        return enterpriseService.remark(vo);
    }

    @PostMapping(value = "bondCreditRating")
    public R bondCreditRating(@RequestBody @Valid EnterpriseBondCreditRatingBody vo) throws Exception {
        return enterpriseService.bondCreditRating(vo);
    }

    @PostMapping(value = "getUipIdByCid")
    public R getUipIdByCid(@RequestBody List<Integer> vo) throws Exception {
        return enterpriseService.getUipIdByCid(vo);
    }

    @PostMapping(value = "financialData")
    public R financialData(@RequestBody EnterpriseFinancialDataBody vo) throws Exception {
        return enterpriseService.financialData(vo);
    }

}
