package com.yuchen.saas.park.service.service.property;


import com.baomidou.mybatisplus.extension.service.IService;
import com.yuchen.saas.park.api.dto.property.*;
import com.yuchen.saas.park.api.entity.property.PropertyHouseMeter;
import com.yuchen.saas.park.api.entity.property.PropertyHouseMeterReading;
import com.yuchen.saas.park.api.vo.property.*;
import org.nest.springwrap.core.mp.support.NestPage;

import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 房源仪表抄表 服务类
 * </p>
 *
 * @author cxj
 * @since 2023-11-27
 */
public interface IPropertyHouseMeterReadingService extends IService<PropertyHouseMeterReading> {

    NestPage<PropertyHouseMeterReadingByHousePageVo>  getPageByHouse(PropertyHouseMeterReadingQueryDto dto);

    void exportTemplate(PropertyHouseMeterReadingQueryDto param, HttpServletResponse response);

    Boolean addList(List<PropertyHouseMeterReadingAddDto> list);

    Boolean updateList(List<PropertyHouseMeterReadingUpdateDto> list);


    Boolean add(Long houseMeterId, BigDecimal meterReadingNum, Date meterReadingTime,Boolean isUpdate);


    PropertyHouseMeterReadingForBuildingVo listForBuilding(PropertyHouseMeterReadingQueryDto dto);

    PropertyHouseMeterReading getByHouseMeterIdAndQuery(Long houseMeterId, Integer isInit, Integer isCharging, Date monthFirstDayDate, Date monthLastDayDate, int firstOrLast);

    NestPage<PropertyHouseMeterReadingDetailPageVo> getPageForDetail(PropertyHouseMeterReadingDetailQueryDto dto);

    Boolean deleteList(List<Long>ids);

    Integer countByIsCharging(Long houseMeterId);

    NestPage<PropertyHouseMeterReadingByResourcePageVo> getPageResource(PropertyHouseMeterReadingResourceQueryDto dto);

    PropertyHouseMeterReadingByAppVo getDetailByApp(Long id);

    Boolean buildCharge(List<Long> ids);

    Boolean buildCharge(Long houseMeterId,Long id,Integer num);

}
