package com.dsk.web.controller.dsk;

import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.system.domain.dsk.dto.JskCombineCertificateDto;
import com.dsk.system.domain.dsk.dto.JskCombineSearchDto;
import com.dsk.system.dskService.JskCombineInfoService;
import lombok.extern.slf4j.Slf4j;
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;

/**
 * 集团户相关信息
 * @author lcl
 * @create 2023/8/7
 */
@Slf4j
@RestController
@RequestMapping(value = "/combine/info")
public class JskCombineInfoController extends BaseController {

    @Autowired
    private JskCombineInfoService baseService;

    /**
     *  集团成员列表
     */
    @PostMapping("/memberList")
    public TableDataInfo memberList(@RequestBody JskCombineSearchDto dto) throws Exception {
        return baseService.memberList(dto);
    }

    /**
     *  分组成员数量
     */
    @PostMapping("/group/memberCount")
    public R groupMemberCount(@RequestBody JskCombineSearchDto dto) {
        return baseService.groupMemberCount(dto);
    }

    /**
     *  集团业绩列表
     */
    @PostMapping("/businessList")
    public TableDataInfo businessList(@RequestBody JskCombineSearchDto dto) throws Exception {
        return baseService.businessList(dto);
    }

    /**
     *  集团资质列表
     */
    @PostMapping("/certificateList")
    public TableDataInfo certificateList(@RequestBody JskCombineSearchDto dto) throws Exception {
        return baseService.certificateList(dto);
    }
    /**
     *  集团成员资质列表
     */
    @PostMapping("/member/certificateList")
    public TableDataInfo menberCertificateList(@RequestBody JskCombineCertificateDto dto) throws Exception {
        return baseService.menberCertificateList(dto);
    }

    /**
     *  集团资质分组统计
     */
    @PostMapping("/group/certificateCount")
    public R groupCertificateCount(@RequestBody JskCombineSearchDto dto) throws Exception {
        return baseService.groupCertificateCount(dto);
    }

    /**
     *  集团户搜索
     */
    @PostMapping("/index")
    public AjaxResult index(@RequestBody JSONObject object) {
        return baseService.index(object);
    }

    /**
     *  查央企
     */
    @PostMapping("/centralEnterprse")
    public AjaxResult centralEnterprse()  {
        return baseService.centralEnterprse();
    }

    /**
     *  查央企子公司
     */
    @PostMapping("/centralEnterprse/child")
    public AjaxResult centralEnterprseChild() {
        return baseService.centralEnterprseChild();
    }

    /**
     *  查央企子公司  翻页
     */
    @PostMapping("/centralEnterprse/child/page")
    public AjaxResult centralEnterprseChildPage(@RequestBody JSONObject object) {
        return baseService.centralEnterprseChildPage(object);
    }

    /**
     *  查地方国企
     */
    @PostMapping("/centralEnterprse/local")
    public AjaxResult centralEnterprseLocal(@RequestBody JSONObject object)  {
        return baseService.centralEnterprseLocal(object);
    }

    /**
     *  查地方国企 翻页
     */
    @PostMapping("/centralEnterprse/local/page")
    public AjaxResult centralEnterprseLocalPage(@RequestBody JSONObject object)  {
        return baseService.centralEnterprseLocalPage(object);
    }

    /**
     *  民营企业
     */
    @PostMapping("/centralEnterprse/social")
    public AjaxResult centralEnterprseSocial()  {
        return baseService.centralEnterprseSocial();
    }

    /**
     *  民营企业  翻页
     */
    @PostMapping("/centralEnterprse/social/page")
    public AjaxResult centralEnterprseSocialPage(@RequestBody JSONObject object)  {
        return baseService.centralEnterprseSocialPage(object);
    }
}
