package cn.superdesk.uniorder.dubbo.provider.invoice.customer.fundrestream;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.exception.UnifiedOrderRuntimeException;
import cn.superdesk.uniorder.dao.entity.invoice.customer.fundrestream.InvoiceBankStatement;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceBankCriteria;
import cn.superdesk.uniorder.dto.vo.unified.UnifiedInvOrderCount;
import cn.superdesk.uniorder.dubbo.facade.invoice.customer.fundrestream.DubboInvoiceBankStatementService;
import cn.superdesk.uniorder.service.invoice.customer.fundrestream.InvoiceBankStatementService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboInvoiceBankStatementServiceImpl implements DubboInvoiceBankStatementService {

	@Autowired
	private InvoiceBankStatementService invoiceBankStatementService;

	@Override
	public R<List<InvoiceBankStatement>> findViewByPage(InvoiceBankCriteria fromVO, int pageNum, int pageSize) throws UnifiedOrderRuntimeException {
		return invoiceBankStatementService.findViewByPage(fromVO, pageNum, pageSize);
	}

	@Override
	public void importBankStatementExcel(String token, List<InvoiceBankStatement> list) throws UnifiedOrderRuntimeException {
		invoiceBankStatementService.importBankStatementExcel(token, list);
	}

	@Override
	public void delete(Map<String, Object> params) throws UnifiedOrderRuntimeException {
		invoiceBankStatementService.delete(params);
	}



	@Override
	public List<InvoiceBankStatement> getBankStatementByApplyId(Map<String, Object> params) throws UnifiedOrderRuntimeException {
		return invoiceBankStatementService.getBankByApplyId(params);
	}

	@Override
	public void deleteBackRegister(Map<String, Object> params) throws UnifiedOrderRuntimeException {
		invoiceBankStatementService.deleteBackRegister(params);
	}

	@Override
	public List<UnifiedInvOrderCount> getInvOrderCount(Long id) {
		return invoiceBankStatementService.getInvOrderCount(id);
	}


	@Override
	public void backRegister(Map<String, Object> params) throws UnifiedOrderRuntimeException {
		invoiceBankStatementService.backRegister(params);
	}
}
