package com.erp.tenant.service.finance;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.erp.tenant.dto.finance.FinancePageResponse;
import com.erp.tenant.entity.finance.FinanceRecord;
import com.erp.tenant.entity.finance.Reconciliation;
import com.erp.common.core.model.PageResponse;

/**
 * 租户端财务服务接口
 */
public interface FinanceService {

    /**
     * 收款/付款记录分页
     */
    IPage<FinanceRecord> getFinancePage(Long tenantId, String type, Integer status,
                                         String startDate, String endDate,
                                         int page, int pageSize);

    /**
     * 财务汇总
     */
    FinancePageResponse.FinanceSummary getFinanceSummary(Long tenantId, String startDate, String endDate);

    /**
     * 记录详情
     */
    FinanceRecord getFinanceDetail(Long tenantId, Long recordId);

    /**
     * 确认收款/付款记录
     */
    boolean confirmRecord(Long tenantId, Long recordId, Long operatorId, String remark);

    /**
     * 取消记录
     */
    boolean cancelRecord(Long tenantId, Long recordId, Long operatorId, String remark);

    /**
     * 对账单分页
     */
    IPage<Reconciliation> getReconciliationPage(Long tenantId, Integer status, String keyword,
                                                int page, int pageSize);

    /**
     * 对账详情
     */
    Reconciliation getReconciliationDetail(Long tenantId, Long reconciliationId);

    /**
     * 完成对账
     */
    boolean completeReconciliation(Long tenantId, Long reconciliationId, Long operatorId, String remark);
}
