package org.springblade.modules.nh.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.modules.nh.excel.PowerStationImport;
import org.springblade.modules.nh.pojo.dto.PowerStationDTO;
import org.springblade.modules.nh.pojo.dto.StationDTO;
import org.springblade.modules.nh.pojo.dto.open.YXPowerStationDTO;
import org.springblade.modules.nh.pojo.entity.PowerStationEntity;
import org.springblade.modules.nh.pojo.vo.HomeOverviewVO;
import org.springblade.modules.nh.pojo.vo.InverterTreeVO;
import org.springblade.modules.nh.pojo.vo.PowerGenerationTrendCoordinatesVO;
import org.springblade.modules.nh.pojo.vo.PowerStationVO;
import org.springblade.modules.nh.excel.PowerStationExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.operation.excel.EntryPaymentTimeExcel;
import org.springblade.modules.operation.excel.EntrySiteExcel;

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

/**
 * 电站 服务类
 *
 * @author AlexWang
 * @since 2024-05-31
 */
public interface IPowerStationService extends BaseService<PowerStationEntity> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param powerStation
	 * @return
	 */
	IPage<PowerStationVO> selectPowerStationPage(IPage<PowerStationVO> page, StationDTO powerStation);


	PowerStationVO getStationDetail(PowerStationEntity powerStation);

	PowerStationEntity getStationDetailByPowCode(String powCode);

	List<PowerStationDTO> getStationListByPowCode(String powCode);

	HomeOverviewVO staticsHomeOverview(Long traderId);
	/**
	 * 导出数据
	 *
	 * @param
	 * @return
	 */
	List<PowerStationExcel> exportPowerStation(StationDTO powerStation);

	R syncPowerStation(PowerStationDTO dto);
	PowerStationEntity getPowerStationByInId(String inId);

	Map<String,Integer> staticsStatus();

	Map<String,Integer> staticsYkStatus();

	Map<String,Object> powerGenerationTrends(Long entryId,String type,String time,String stationCode);

	PowerStationEntity getByInnerId(String innerStationId);

	PowerStationEntity getByOutStationId(String outStationId);

	Map<String,Object> powerGenTrendsByInnerId(String innerStationId,String type,String time);

	PowerGenerationTrendCoordinatesVO powerGenerationTrendsHome(String type, String traderId);

	PowerGenerationTrendCoordinatesVO statByProjectCompany(String type, String traderId);

	IPage<YXPowerStationDTO> queryListForYX(IPage<YXPowerStationDTO> page,StationDTO powerStation);


	R<List<Map<String,Object>>> getMapdistribution();

	List<InverterTreeVO> getLazyTree(String parentId,String parentName,int level);

	InverterTreeVO getTotalTree();

	void updatePowerStationBrand();

	IPage<PowerStationEntity> findMyPowerStation(IPage<PowerStationEntity> page, String empId,String siteId,String condition);


	List<StationDTO> getSelectPowerStaion(Map<String,Object> map);

	R importSite(List<EntrySiteExcel> data);


	boolean batchUpdateStation(List<PowerStationEntity> stationList);


	void importPaymentTime(List<EntryPaymentTimeExcel> list);


}
