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.EnterpriseCreditService;
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 = "/enterpriseCredit")
public class EnterpriseCreditController {
    @Autowired
    EnterpriseCreditService enterpriseCreditService;

    @PostMapping(value = "/penalizePage")
    public TableDataInfo penalizePage(@RequestBody @Valid EnterpriseCreditPenalizePageBody body) throws Exception {
        return enterpriseCreditService.penalizePage(body);
    }

    @PostMapping(value = "/penalizeReasonType")
    public R penalizeReasonType(@RequestBody @Valid EnterpriseCreditPenalizeReasonTypeBody body) throws Exception {
        return enterpriseCreditService.penalizeReasonType(body);
    }

    @PostMapping(value = "/abnormalPage")
    public TableDataInfo abnormalPage(@RequestBody @Valid EnterpriseCreditAbnormalPageBody body) throws Exception {
        return enterpriseCreditService.abnormalPage(body);
    }

    @PostMapping(value = "/abnormalYears")
    public R abnormalYears(@RequestBody @Valid EnterpriseCreditAbnormalYearsBody body) throws Exception {
        return enterpriseCreditService.abnormalYears(body);
    }

    @PostMapping(value = "/executedPersonsPage")
    public TableDataInfo executedPersonsPage(@RequestBody @Valid EnterpriseCreditExecutedPersonsPageBody body) throws Exception {
        return enterpriseCreditService.executedPersonsPage(body);
    }

    @PostMapping(value = "/executedPage")
    public TableDataInfo executedPage(@RequestBody @Valid EnterpriseCreditExecutedPageBody body) throws Exception {
        return enterpriseCreditService.executedPage(body);
    }

    @PostMapping(value = "/lawsuitsPage")
    public TableDataInfo lawsuitsPage(@RequestBody @Valid EnterpriseCreditLawsuitsPageBody body) throws Exception {
        return enterpriseCreditService.lawsuitsPage(body);
    }

    @PostMapping(value = "/lawsuitsCauseAction")
    public R lawsuitsCauseAction(@RequestBody @Valid EnterpriseCreditLawsuitsCauseActionBody body) throws Exception {
        return enterpriseCreditService.lawsuitsCauseAction(body);
    }

    @PostMapping(value = "/lawsuitsRole")
    public R lawsuitsRole(@RequestBody @Valid EnterpriseCreditLawsuitsRoleBody body) throws Exception {
        return enterpriseCreditService.lawsuitsRole(body);
    }

    @PostMapping(value = "/noticesPage")
    public TableDataInfo noticesPage(@RequestBody @Valid EnterpriseCreditNoticePageBody body) throws Exception {
        return enterpriseCreditService.noticesPage(body);
    }

    @PostMapping(value = "/noticesType")
    public R noticesType(@RequestBody @Valid EnterpriseCreditNoticeTypeBody body) throws Exception {
        return enterpriseCreditService.noticesType(body);
    }

    @PostMapping(value = "/noticesRole")
    public R noticesRole(@RequestBody @Valid EnterpriseCreditNoticeRoleBody body) throws Exception {
        return enterpriseCreditService.noticesRole(body);
    }

    @PostMapping(value = "/noticesCaseReason")
    public R noticesCaseReason(@RequestBody @Valid EnterpriseCreditNoticeCaseReasonBody body) throws Exception {
        return enterpriseCreditService.noticesCaseReason(body);
    }

    @PostMapping(value = "/kaitingPage")
    public TableDataInfo kaitingPage(@RequestBody @Valid EnterpriseCreditKaitingPageBody body) throws Exception {
        return enterpriseCreditService.kaitingPage(body);
    }

    @PostMapping(value = "/kaitingCauseAction")
    public R kaitingCauseAction(@RequestBody @Valid EnterpriseCreditKaitingCauseActionBody body) throws Exception {
        return enterpriseCreditService.kaitingCauseAction(body);
    }

    @PostMapping(value = "/kaitingPureRole")
    public R kaitingPureRole(@RequestBody @Valid EnterpriseCreditKaitingPureRoleBody body) throws Exception {
        return enterpriseCreditService.kaitingPureRole(body);
    }

    @PostMapping(value = "/restrictedConsumerPage")
    public TableDataInfo restrictedConsumerPage(@RequestBody @Valid EnterpriseCreditPageBody body) throws Exception {
        return enterpriseCreditService.restrictedConsumerPage(body);
    }

    @PostMapping(value = "/judicialFreezesPage")
    public TableDataInfo judicialFreezesPage(@RequestBody @Valid EnterpriseCreditPageBody body) throws Exception {
        return enterpriseCreditService.judicialFreezesPage(body);
    }

    /***
     *@Description: 信用中国-行政许可信息
     *@Param: 
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2024/5/13 14:24
     */
    @PostMapping(value = "/selectChinaXzxkPage")
    public TableDataInfo selectChinaXzxkPage(@RequestBody @Valid EnterpriseCreditChinaPageBody body) throws Exception {
        return enterpriseCreditService.selectChinaXzxkPage(body);
    }

    /***
     *@Description: 信用中国-行政许可信息-详情
     *@Param:
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2024/5/13 14:24
     */
    @PostMapping(value = "/selectChinaXzxk/detail")
    public R selectChinaXzxkDetail(@RequestBody @Valid EnterpriseCreditChinaDetailBody body) throws Exception {
        return enterpriseCreditService.selectChinaXzxkDetail(body);
    }

    /***
     *@Description: 信用中国-行政处罚信息
     *@Param:
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2024/5/13 14:24
     */
    @PostMapping(value = "/selectChinaXzcfPage")
    public TableDataInfo selectChinaXzcfPage(@RequestBody @Valid EnterpriseCreditChinaPageBody body) throws Exception {
        return enterpriseCreditService.selectChinaXzcfPage(body);
    }

    /***
     *@Description: 信用中国-行政处罚信息详情
     *@Param:
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2024/5/13 14:24
     */
    @PostMapping(value = "/selectChinaXzcf/detail")
    public R selectChinaXzcfDetail(@RequestBody @Valid EnterpriseCreditChinaDetailBody body) throws Exception {
        return enterpriseCreditService.selectChinaXzcfDetail(body);
    }

    /***
     *@Description: 信用中国-诚实守信-纳税信用等级信息
     *@Param:
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2024/5/13 14:24
     */
    @PostMapping(value = "/selectChinaNsxydjPage")
    public TableDataInfo selectChinaNsxydjPage(@RequestBody @Valid EnterpriseCreditChinaPageBody body) throws Exception {
        return enterpriseCreditService.selectChinaNsxydjPage(body);
    }

    /***
     *@Description: 信用中国-诚实守信-海关高级认证企业
     *@Param:
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2024/5/13 14:24
     */
    @PostMapping(value = "/selectChinaHggjczqyPage")
    public TableDataInfo selectChinaHggjczqyPage(@RequestBody @Valid EnterpriseCreditChinaPageBody body) throws Exception {
        return enterpriseCreditService.selectChinaHggjczqyPage(body);
    }


    /***
     *@Description: 信用中国-诚实守信-严重失信主体名单
     *@Param:
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2024/5/13 14:24
     */
    @PostMapping(value = "/selectChinaYzsxztmdPage")
    public TableDataInfo selectChinaYzsxztmdPage(@RequestBody @Valid EnterpriseCreditChinaPageBody body) throws Exception {
        return enterpriseCreditService.selectChinaYzsxztmdPage(body);
    }

    /***
     *@Description: 信用中国-诚实守信-经营异常
     *@Param:
     *@return: com.dsk.common.core.page.TableDataInfo
     *@Author: Dgm
     *@date: 2024/5/13 14:24
     */
    @PostMapping(value = "/selectChinaJyycPage")
    public TableDataInfo selectChinaJyycPage(@RequestBody @Valid EnterpriseCreditChinaPageBody body) throws Exception {
        return enterpriseCreditService.selectChinaJyycPage(body);
    }

}
