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.domain.bo.EnterpriseProjectImportantListDto;
import com.dsk.jsk.service.EnterpriseProjectService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
*@Description: 央企经营管理系统企业项目相关
*@Author: zhangyi
*@date: 2023/5/17 9:03
*/
@Slf4j
@RestController
@RequestMapping(value = "/enterpriseProject")
public class EnterpriseProjectController {
    @Autowired
    EnterpriseProjectService enterpriseProjectService;

    @PostMapping(value = "/landTransactionPage")
    public TableDataInfo landTransactionPage(@RequestBody @Valid EnterpriseProjectLandTransactionPageBody body) throws Exception {
        return enterpriseProjectService.landTransactionPage(body);
    }

    @PostMapping(value = "/landUse")
    public R landUse(@RequestBody @Valid EnterpriseProjectLandUseBody body) throws Exception {
        return enterpriseProjectService.landUse(body);
    }

    @PostMapping(value = "/landDetail")
    public R landDetail(@RequestBody @Valid EnterpriseProjectLandDetailBody body) throws Exception {
        return enterpriseProjectService.landDetail(body);
    }

    @PostMapping(value = "/approvalProjectPage")
    public TableDataInfo approvalProjectPage(@RequestBody @Valid EnterpriseProjectApprovalProjectPageBody body) throws Exception {
        return enterpriseProjectService.approvalProjectPage(body);
    }

    @PostMapping(value = "/approvalInfoDetail")
    public R approvalInfoDetail(@RequestBody @Valid EnterpriseProjectApprovalInfoDetailBody body) throws Exception {
        return enterpriseProjectService.approvalInfoDetail(body);
    }

    @PostMapping(value = "/approvalExaminePage")
    public TableDataInfo approvalExaminePage(@RequestBody @Valid EnterpriseProjectApprovalExaminePageBody body) throws Exception {
        return enterpriseProjectService.approvalExaminePage(body);
    }

    @PostMapping(value = "/approvalMarketingPage")
    public TableDataInfo approvalMarketingPage(@RequestBody @Valid EnterpriseProjectApprovalMarketingPageBody body) throws Exception {
        return enterpriseProjectService.approvalMarketingPage(body);
    }

    @PostMapping(value = "/specialDebtProjectPage")
    public TableDataInfo specialDebtProjectPage(@RequestBody @Valid EnterpriseProjectSpecialDebtProjectPageBody  body) throws Exception {
        return enterpriseProjectService.specialDebtProjectPage(body);
    }

    @PostMapping(value = "/specialDebtProjectDetail")
    public R specialDebtProjectDetail(@RequestBody @Valid EnterpriseProjectSpecialDebtProjectDetailBody body) throws Exception {
        return enterpriseProjectService.specialDebtProjectDetail(body);
    }

    @PostMapping(value = "/specialDebtPage")
    public TableDataInfo specialDebtPage(@RequestBody @Valid EnterpriseProjectSpecialDebtPageBody body) throws Exception {
        return enterpriseProjectService.specialDebtPage(body);
    }

    /***
     *@Description: 招标公告 分页列表
     *@Param:
     *@return: com.dsk.common.core.domain.R
     *@Author: Dgm
     *@date: 2023/10/9 14:41
     */
    @PostMapping(value = "/bidNoticePage")
    public TableDataInfo bidNoticePage(@RequestBody @Valid EnterpriseProjectBidNoticePageBody body) throws Exception {
        return enterpriseProjectService.bidNoticePage(body);
    }

    /***
     *@Description: 招标招采阶段
     *@Param:
     *@return: com.dsk.common.core.domain.R
     *@Author: Dgm
     *@date: 2023/10/9 14:41
     */
    @PostMapping(value = "/bidNoticeTenderStage")
    public R bidNoticeTenderStage(@RequestBody @Valid EnterpriseProjectBidNoticeTenderStageBody body) throws Exception {
        return enterpriseProjectService.bidNoticeTenderStage(body);
    }

    @PostMapping(value = "/bidNoticeArea")
    public R bidNoticeArea(@RequestBody @Valid EnterpriseProjectBidNoticeAreaBody body) throws Exception {
        return enterpriseProjectService.bidNoticeArea(body);
    }

    /***
     *@Description: 招标项目类别
     *@Param:
     *@return: com.dsk.common.core.domain.R
     *@Author: Dgm
     *@date: 2023/10/9 14:41
     */
    @PostMapping(value = "/bidNoticeProjectCategory")
    public R bidNoticeProjectCategory(@RequestBody @Valid EnterpriseProjectBidNoticeTenderStageBody body) throws Exception {
        return enterpriseProjectService.bidNoticeProjectCategory(body);
    }


    @PostMapping(value = "/bidNoticeDetail")
    public R bidNoticeDetail(@RequestBody @Valid EnterpriseProjectBidNoticeDetailBody body) throws Exception {
        return enterpriseProjectService.bidNoticeDetail(body);
    }

    @PostMapping(value = "/bidPlanPage")
    public TableDataInfo bidPlanPage(@RequestBody @Valid EnterpriseProjectBidPlanPageBody body) throws Exception {
        return enterpriseProjectService.bidPlanPage(body);
    }

    @PostMapping(value = "/bidPlanProjectType")
    public R bidPlanProjectType(@RequestBody @Valid EnterpriseProjectBidPlanProjectTypeBody body) throws Exception {
        return enterpriseProjectService.bidPlanProjectType(body);
    }

    @PostMapping(value = "/bidPlanDetail")
    public R bidPlanDetail(@RequestBody @Valid EnterpriseProjectBidPlanDetailBody body) throws Exception {
        return enterpriseProjectService.bidPlanDetail(body);
    }

    @PostMapping(value = "/bidNoticeProPage")
    public TableDataInfo bidNoticeProPage(@RequestBody @Valid EnterpriseProjectBidNoticeProPageBody body) throws Exception {
        return enterpriseProjectService.bidNoticeProPage(body);
    }

    @PostMapping(value = "/bidNoticeProProjectType")
    public R bidNoticeProProjectType(@RequestBody @Valid EnterpriseProjectBidNoticeProProjectTypeBody body) throws Exception {
        return enterpriseProjectService.bidNoticeProProjectType(body);
    }

    @PostMapping(value = "/bidNoticeProProjectPurposes")
    public R bidNoticeProProjectPurposes(@RequestBody @Valid EnterpriseProjectBidNoticeProProjectPurposesBody body) throws Exception {
        return enterpriseProjectService.bidNoticeProProjectPurposes(body);
    }

    @PostMapping(value = "/bidNoticeProAssessmentWay")
    public R bidNoticeProAssessmentWay(@RequestBody @Valid EnterpriseProjectBidNoticeProAssessmentWayBody body) throws Exception {
        return enterpriseProjectService.bidNoticeProAssessmentWay(body);
    }

    @PostMapping(value = "/bidNoticeProDetail")
    public R bidNoticeProDetail(@RequestBody @Valid EnterpriseProjectBidNoticeProDetailBody body) throws Exception {
        return enterpriseProjectService.bidNoticeProDetail(body);
    }

    @PostMapping(value = "/creditXzxkPage")
    public TableDataInfo creditXzxkPage(@RequestBody @Valid EnterpriseProjectCreditXzxkPageBody body) throws Exception {
        return enterpriseProjectService.creditXzxkPage(body);
    }


    /***
     *@Description: 重点项目详情
     *@Param:
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2023/9/5 17:49
     */
    @RequestMapping(value = "/importantDetail", method = RequestMethod.POST)
    public R importantDetail(@RequestBody @Valid EnterpriseProjectImportantDetailBody body) throws Exception {
        return enterpriseProjectService.importantDetail(body);
    }

    /***
     *@Description: 公招市场-流程速览
     *@Param:
     *@return: com.dsk.common.core.domain.R
     *@Author: Dgm
     *@date: 2023/9/19 13:49
     */
    @RequestMapping(value = "/projectProcess", method = RequestMethod.POST)
    public R projectProcess(@RequestBody @Valid EnterpriseProjectProcessDetailBody body) throws Exception {
        return enterpriseProjectService.projectProcess(body);
    }

    /**
     * 企业重点项目列表
     */
    @RequestMapping(value = "/importantList", method = RequestMethod.POST)
    public TableDataInfo importantList(@RequestBody EnterpriseProjectImportantListDto dto) throws Exception {
        return enterpriseProjectService.importantList(dto);
    }

}
