package com.cpp.web.controller.electricityRestriction;

import com.cpp.common.core.domain.R;
import com.cpp.web.service.electricityRestriction.ElectricityRestrictionService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * 限电统计查询控制层
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("electricityRestriction")
public class electricityRestrictionController {

    private final ElectricityRestrictionService electricityRestrictionService;
    @GetMapping("/getData")
    public R getData(Long startTime,Long endTime,String stationCode){
        return R.ok(electricityRestrictionService.getElectricityRestriction(new Date(startTime),new Date(endTime),stationCode));
    }
}
