package cn.com.victorysoft.business.calc.controller;

import cn.com.victorysoft.business.calc.dto.IndexUnitMonthDto;
import cn.com.victorysoft.business.calc.entity.UnitDaily;
import cn.com.victorysoft.business.calc.service.*;
import cn.com.victorysoft.business.indicator.dto.UnitMonthDto;
import cn.com.victorysoft.business.indicator.entity.WellSectionMonth;
import cn.com.victorysoft.business.indicator.param.SectionRateWellExportParam;
import cn.com.victorysoft.business.indicator.param.WellSectionMonthParam;
import cn.com.victorysoft.business.indicator.service.LessSummaryService;
import cn.com.victorysoft.business.indicator.service.MoreSummaryService;
import cn.com.victorysoft.business.indicator.service.SectionRateSummaryService;
import cn.com.victorysoft.business.sys.entity.DateRange;
import cn.com.victorysoft.business.sys.entity.ExportResult;
import cn.com.victorysoft.business.sys.param.UnitDateParam;
import cn.com.victorysoft.business.sys.param.UnitMonthParam;
import cn.com.victorysoft.business.util.DateUtils;
import cn.com.victorysoft.business.util.ExcelUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Api(tags = "系统首页")
@RestController
@RequestMapping("index")
public class IndexController {
    @Resource
    private IndexService indexService;

    @GetMapping("/daily")
    @ApiOperation("查询单位日度数据")
    public UnitDaily selectUnitDaily(UnitDateParam param){
        return indexService.selectUnitDaily(param);
    }

    @GetMapping("/month")
    @ApiOperation("查询单位月度数据")
    public IndexUnitMonthDto selectUnitDaily(UnitMonthParam param){
        return indexService.selectUnitMonth(param);
    }

}
