package com.ssm.manage.service;

import com.github.pagehelper.PageInfo;
import com.ssm.core.service.BaseService;
import com.ssm.manage.entity.*;
import com.ssm.manage.extendEntity.StaffProgress;
import com.ssm.manage.extendEntity.StoreDaily;
import com.ssm.manage.query.AccountTradeRecordRequest;
import com.ssm.manage.query.CashListRequest;
import com.ssm.manage.query.StoreDailyRequest;
import com.ssm.manage.response.CashDayVo;
import com.ssm.manage.response.CashListResponse;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Collection;
import java.util.Date;
import java.util.List;

public interface SsmCashService extends BaseService<CashList> {
    void createTable();
    PageInfo<CashListResponse> selectPage(CashListRequest cashListRequest) throws SmsException, ParseException;

    PageInfo<CashListResponse> selectCashList(CashListRequest cashListRequest) throws SmsException, ParseException;
    PageInfo<CashListResponse> selectCashListNew(CashListRequest cashListRequest) throws SmsException, ParseException;
    PageInfo<CashListResponse> cashListDetail(CashListRequest cashListRequest) throws SmsException, ParseException;
    PageInfo<CashListResponse> selectCashLists(CashListRequest cashListRequest) throws SmsException, ParseException;

    String getDocNum(CashListRequest cashListRequest,String storeNum);

    List<AccountTradeRecord> doCash(List<CashListRequest> cashListRequestList, String phone, CashSignatureFile cashSignatureFile) throws SmsException, ParseException;
    List<AccountTradeRecord> doCashSalem(List<CashListRequest> cashListRequestList, String phone, CashSignatureFile cashSignatureFile,Long storeId) throws SmsException, ParseException;
    List<AccountTradeRecord> doCashsj(List<CashListRequest> cashListRequestList, String phone, CashSignatureFile cashSignatureFile,Long storeId) throws SmsException, ParseException;

    int cancel(List<CashListRequest> cashListRequestList, String phone) throws SmsException;

    int addCashList(CashList cashList) throws SmsException;
    List<AccountTradeRecord> addCashList(List<CashListRequest> listRequests, Long storeId, String storeName, String phone, CashSignatureFile cashSignatureFile) throws SmsException, ParseException;
    List<AccountTradeRecord> addCash(List<CashListRequest> listRequests, Long storeId, String storeName, String phone, CashSignatureFile cashSignatureFile) throws SmsException, ParseException;

    int updateStaff(List<CashListRequest> cashListRequestList, Long storeId) throws SmsException;

    int cancelRowOnly(RefundCash refundCash, RefundOrderList refundOrderList) throws SmsException;

    int restoreRowOnly(RefundCash refundCash, RefundOrderList refundOrderList) throws SmsException;

    List<CashListResponse> selectList(Long storeId, String dateStr, Date date) throws SmsException, ParseException;
    List<CashList> selectListByStartTimeAndEndTime(Long storeId, String dateStr, Date startTime,Date endTime) throws SmsException, ParseException;
    List<CashListResponse> selectListchia(Long storeId, Date startDate,Date endDate) throws SmsException, ParseException;
    List<CashListResponse> selectListAbnormal(Long storeId, String dateStr, Date date) throws SmsException, ParseException;
    List<CashListResponse> selectListAbnormalNew(Long storeId,  Date startTime,Date endTime) throws SmsException, ParseException;
    List<CashListResponse> selectLists(Long storeId, String startDate, String endDate, Date date) throws SmsException, ParseException;

    PageInfo<CashListResponse> selectByMember(CashListRequest cashListRequest) throws SmsException;

    PageInfo<CashListResponse> selectProgress(CashListRequest cashListRequest) throws SmsException, ParseException;

    PageInfo<StaffProgress> selectStaffProgress(StaffProgress staffProgress) throws SmsException;

    List<StoreDaily> selectDayRecord(StoreDailyRequest storeDailyRequest) throws SmsException;
    List<StoreDaily> selectDayRecordManAndWoman(StoreDailyRequest storeDailyRequest) throws SmsException;
    List<StoreDaily> selectDayRecordRec(StoreDailyRequest storeDailyRequest) throws SmsException;
    List<StoreDaily> selectDayRecordRecByDate(StoreDailyRequest storeDailyRequest) throws SmsException;
    List<StoreDaily> selectDayRecordCou(StoreDailyRequest storeDailyRequest) throws SmsException;
    List<StoreDaily> selectDayRecordCouByDate(StoreDailyRequest storeDailyRequest) throws SmsException;

    PageInfo<CashListResponse> selectByRecharge(AccountTradeRecordRequest accountTradeRecordRequest);

    List<StoreDaily> selectRecordByMonth(StoreDailyRequest storeDailyRequest) throws SmsException, ParseException;

    List<CashList> selectDownloadRecord(CashListRequest cashListRequest) throws SmsException, ParseException;

    List<CashList> selectList(CashListRequest cashListRequest)  throws SmsException, ParseException ;

    List<CashList> selectListSalem(CashList cashList);
    int updatechia(CashList cashList);

    //补单短信重发
    AccountTradeRecord retransmission(AccountTradeRecord accountTradeRecord) throws SmsException, ParseException;

    List<CashList> getAllCashList(CashListRequest cashListRequest);

    List<CashDayVo> selectByDay(StoreDailyRequest storeDailyRequest);

    List<StoreDaily> selectByDayGroupByDateAndStoreId(StoreDailyRequest storeDailyRequest);

    List<CashList> selectListByMonthly(CashListRequest cashListRequest);

    BigDecimal selectFKJByRefundCashGifMoney(StoreDailyRequest storeDailyRequest);

    PageInfo<CashListResponse> cashListByDocNum(CashListRequest cashListRequest);

}
