package com.hz.pm.api.gov.controller;


import com.hz.pm.api.gov.manage.BelongOrgManage;
import com.hz.pm.api.gov.model.vo.GovBusinessStripVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author liuxinxin
 * @since 2023-04-18
 */
@Slf4j
@Validated
@RestController
@RequiredArgsConstructor
@Api(value = "BelongOrgController", tags = "单位所属条线")
@RequestMapping("/api/v1/belong-org")
public class BelongOrgController {

    private final BelongOrgManage belongOrgManage;

    @GetMapping("/business-strip/list")
    @ApiOperation("获取条线列表")
    public List<GovBusinessStripVO> getGovBusinessStripList(@RequestParam(value = "businessStripName", required = false) String businessStripName) {
        return belongOrgManage.getGovBusinessStripList(businessStripName);
    }

    @GetMapping("/business-strip/expert/analysis")
    @ApiOperation("分析专家数据")
    public void analysisExpertOrg() {
        belongOrgManage.analysisExpertOrg();
    }

}
