package org.dromara.daping.controller;


import cn.dev33.satoken.annotation.SaCheckPermission;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.dromara.daping.domain.bo.GinlongBo;
import org.dromara.daping.service.IGinlongApiService;
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.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/ginlong/api")
public class GinlongApiController extends BaseController {

    private final IGinlongApiService ginlongApiService;


    /**
     * 查询手续办理清单模板列表
     */
    @SaCheckPermission("formalities:listOfFormalities:list")
    @GetMapping("/getPowerStationOverview")
    public R<HashMap<String,Object>> getPowerStationOverview() {
        HashMap<String, Object> map = ginlongApiService.getPowerStationOverview();
        return R.ok(map);
    }

    /**
     * 查询手续办理清单模板列表
     */
    @SaCheckPermission("formalities:listOfFormalities:list")
    @GetMapping("/getInverterListOverview")
    public R<HashMap<String,Object>> getInverterListOverview(GinlongBo bo) {
        HashMap<String, Object> map = ginlongApiService.getInverterListOverview(bo);
        return R.ok(map);
    }

    /**
     * 能源收益分析
     */
    @SaCheckPermission("formalities:listOfFormalities:list")
    @GetMapping("/getStationMonthOverview")
    public R<HashMap<String,Object>> getStationMonthOverview(GinlongBo bo) {
        HashMap<String, Object> map = ginlongApiService.getStationMonthOverview(bo);
        return R.ok(map);
    }


    /**
     * 告警信息
     */
    @SaCheckPermission("formalities:listOfFormalities:list")
    @GetMapping("/getAlarmListOverview")
    public R<List<HashMap<String,Object>>> getAlarmListOverview() {
        return R.ok(ginlongApiService.getAlarmListOverview());
    }




}
