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);
    }

}
