package com.iformall.service;

import com.iformall.common.ResultData;
import com.iformall.domain.po.WxBillProperty;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.po.WxPropertyContract;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * @author gongbiao
 */
public interface WxPropertyContractService {

	/**
     * 根据实体查询分页列表
     *
     * @param record
     * @param pageIndex
     * @param pageSize
     * @return
     */
    Map<String, Object> listAsPage(WxPropertyContract record, Integer pageIndex, Integer pageSize);
	
	/**
     * 根据Id获得实体
     *
     * @param id
     * @return
     */
    Map<String, Object> getById(Long id);

    /**
     * 保存或更新实体
     * @param record
     * @param userId
     * @param oldDate
     * @return
     */
    ResultData saveOrUpdate(WxPropertyContract record, Long userId, String userName);

    /**
     * 根据Id删除实体
     *
     * @param id
     */
    void deleteById(Long id);


    void download(HttpServletRequest request, HttpServletResponse response, String tenantId);

    Object getRentContractStatusInfo(WxPropertyContract record);

    ResultData endRentContract(Long id);

    Object getRentContractList(WxPropertyContract record);


    ResultData endPropertyContractByRentContractId(Long rentContractId);

    ResultData hasRentContract(Long rentContractId);

    ResultData updatePropertyContractStatus(Long id);

    void endContract(WxPropertyContract wxPropertyContract);

    void updatePropertyPreviewBill(WxPropertyContract record);

    List<WxBillProperty> getWxBillPropertyPreview(Long id);

    Map<String, Object> updateStatus(WxPropertyContract record);

    List<WxBillProperty> buildProperty(WxMerchant wxMerchant, Long userId, WxPropertyContract propertyContract, Integer isPreview,boolean saveDb);

    WxPropertyContract getByBill(WxBillProperty billRent);


}
