package org.springblade.modules.nh.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import org.springblade.modules.nh.excel.PowerStationImport;
import org.springblade.modules.nh.pojo.dto.DeviceDTO;
import org.springblade.modules.nh.pojo.dto.PowerStationPaymentTimeDTO;
import org.springblade.modules.nh.pojo.entity.DeviceEntity;
import org.springblade.modules.nh.pojo.entity.DeviceMsgEntity;
import org.springblade.modules.nh.pojo.entity.PowerStationEntity;
import org.springblade.modules.nh.pojo.vo.DeviceVO;
import org.springblade.modules.nh.excel.DeviceExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;

/**
 * 设备管理 服务类
 *
 * @author AlexWang
 * @since 2024-05-31
 */
public interface IDeviceService extends BaseService<DeviceEntity> {
	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param device
	 * @return
	 */
	IPage<DeviceVO> selectDevicePage(IPage<DeviceVO> page, DeviceVO device);

	List<DeviceEntity> listByPowerStation(PowerStationEntity powerStationEntity);

	DeviceVO fillDetail(DeviceVO vo);
	/**
	 * 导出数据
	 *
	 * @param queryWrapper
	 * @return
	 */
	List<DeviceExcel> exportDevice(Wrapper<DeviceEntity> queryWrapper);

	DeviceVO getDetail(Long id);

	R syncDeviceData(DeviceDTO dto);

	DeviceEntity getInverterBySn(String sn);

	void updateSn(Long id,String sn);

	boolean updateGenDate(String id,String time);

	void importPowerStation(List<PowerStationImport> list, Boolean isCovered);

	R materialChangeCauseDeviceChange(List<DeviceDTO> list);

	List<DeviceMsgEntity> editSnMsg(String id);

	void editPaymentTime(PowerStationPaymentTimeDTO paymentTimeDTO);
}
