package com.bootdo.datas.controller;

import com.alibaba.fastjson.JSONArray;
import com.bootdo.common.annotation.Log;
import com.bootdo.common.utils.PageUtils;
import com.bootdo.common.utils.Query;
import com.bootdo.common.utils.R;
import com.bootdo.common.utils.StringUtils;
import com.bootdo.datas.domain.GbDataExcelDO;
import com.bootdo.datas.domain.GyDataExcelDO;
import com.bootdo.datas.dto.ExamineLogDTO;
import com.bootdo.datas.dto.GyDataImportDTO;
import com.bootdo.datas.service.DataService;
import com.bootdo.datas.service.ExamineLogService;
import com.bootdo.datas.service.GyDataService;
import com.bootdo.datas.tools.ExcelUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 审核日志Controller层
 * @author lyao
 * 2022-11-20 08:42:11
 */

@Controller
@RequestMapping("/datas/examine-log")
public class ExamineLogController {

    private static Logger log = LoggerFactory.getLogger(ExamineLogController.class);

    @Autowired
    private ExamineLogService examineLogService;

    @ResponseBody
    @GetMapping("/list")
    @RequiresPermissions({ "datas:gyDataImport:data", "datas:dataVerify:data" })
    public PageUtils list(@RequestParam Map<String, Object> params) {
        // 查询列表数据
        Query query = new Query(params);
        List<ExamineLogDTO> dataList = examineLogService.list(query);
        int total = examineLogService.countTotal(query);
        PageUtils pageUtils = new PageUtils(dataList, total);
        return pageUtils;
    }

}
