package cn.ezhizao.project.business.productionCompany.controller;

import cn.ezhizao.common.utils.StringUtils;
import cn.ezhizao.common.utils.poi.ExcelUtil;
import cn.ezhizao.framework.aspectj.lang.annotation.Log;
import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
import cn.ezhizao.framework.web.controller.BaseController;
import cn.ezhizao.framework.web.domain.AjaxResult;
import cn.ezhizao.framework.web.page.TableDataInfo;

import cn.ezhizao.project.business.company.domain.BizCompany;
import cn.ezhizao.project.business.company.domain.DictRegion;
import cn.ezhizao.project.business.company.service.IBizCompanyService;
import cn.ezhizao.project.business.company.service.IDictRegionService;
import cn.ezhizao.project.business.company.service.impl.BizCompanyServiceImpl;

import cn.ezhizao.project.business.productionCompany.domain.BizProductionCompany;
import cn.ezhizao.project.business.productionCompany.service.IBizProductionCompanyService;
import cn.ezhizao.project.system.service.ISysUserService;
import com.alibaba.fastjson2.JSONArray;
import org.apache.commons.io.IOUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.List;

/**
 * companyController
 *
 * @author ezhizao
 * @date 2023-10-16
 */
@RestController
@RequestMapping("/business/ProductionCompany")
public class BizProductionCompanyController extends BaseController
{
    @Resource
    private IBizProductionCompanyService bizCompanyService;
    
    /**
     * 查询company列表
     */
    @GetMapping("/list")
    public TableDataInfo list(BizProductionCompany bizCompany) throws NoSuchFieldException, IllegalAccessException
    {
        setTenantId(bizCompany);
        startPage();
        startOrderBy();
        List<BizProductionCompany> list = bizCompanyService.getList(bizCompany);
        return getDataTable(list);
    }

}
