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


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

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 减免活动-直接减免 服务类
 * </p>
 *
 * @author cxj
 * @since 2023-12-19
 */
public interface IPropertyDirectReductionService extends IService<PropertyDirectReduction> {

    NestPage<PropertyDirectReductionPageVo>  getPage(PropertyDirectReductionQueryDto dto);


    Boolean addOrUpdate(PropertyDirectReductionAddDto dto);

    Boolean del(Long id);

    Boolean stop(Long id);

    Boolean audit(PropertyDirectReductionAuditDto param);

    PropertyDirectReductionDetailVo getDetailById(Long id);

    PropertyDirectReductionAuditVo getAuditById(Long id);

    PropertyDirectReductionVo getPayReduction(Long houseId, Long unitPrice, Long totalPrice,
                                              Long feeStandardId, Date paymentTime, Integer monthNum, Date billStartTime, Date billEndTime);


    /** 按条件获取缴费减免详情
     *
     * @param houseId 房源id
     * @param unitPrice 单价
     * @param totalPrice 总价
     * @param feeStandardId 收费标准id
     * @param paymentTime 支付时间
     * @param monthNum 总账单包含的月数
     * @param billStartTime 账单开始时间
     * @param billEndTime 账单结算时间
     * @param isArrears 是否欠费 false未欠费,true欠费
     */
    PropertyReductionVo getAllReduction(Long houseId, Long unitPrice, Long totalPrice,
                                              Long feeStandardId, Date paymentTime, Integer monthNum, Date billStartTime, Date billEndTime, boolean isArrears);

    List<PropertyReductionListVo> listByHouseId(Long houseId);
}
