package org.dromara.payment.thirdPlatform.xinyujian.service;

import org.dromara.payment.bill.domain.MerBill;
import org.dromara.payment.bill.domain.MerBillDetail;
import org.dromara.payment.invoice.domain.MerInvoice;
import org.dromara.payment.merchant.domain.BusMerchant;
import org.dromara.payment.merchant.domain.BusMerchantAccount;
import org.dromara.payment.sys.domain.SysSyd;
import org.dromara.payment.task.domain.MerTask;
import org.dromara.payment.thirdPlatform.base.IBaseBusinessFlowService;
import org.dromara.payment.thirdPlatform.xinyujian.sign.BaseDataVo;
import org.dromara.payment.worker.domain.UserWorker;

import java.util.List;

/**
 * @author sunzexing
 * @version 1.0
 * @title IXyjService
 * @description
 * @create 2025-03-28 14:26
 */
public interface IXyjService extends IBaseBusinessFlowService {


    boolean addMerchant(BusMerchant busMerchant, Long sydId);

    boolean createProjectTask(MerTask task, BusMerchant merchant);

    boolean createTask(MerTask task, BusMerchant merchant);

    boolean recruitBatch(MerBill bill, List<MerBillDetail> detailList, BusMerchant merchant, SysSyd syd,
                         MerTask task);

    boolean recruitOne(MerBill bill);

    boolean settleBatch(MerBill bill, List<MerBillDetail> detailList, SysSyd syd, BusMerchant merchant, MerTask task,
                        BusMerchantAccount account);

    boolean signFind(BusMerchant merchant, SysSyd syd, UserWorker userWorker);

    boolean applyInvoice(BusMerchant busMerchant, SysSyd syd, MerInvoice invoice);

    /****
     * 企业入驻回调
     * @param bdvo
     * @param sydId
     * @return
     */
    public boolean addMerchantCallback(BaseDataVo bdvo, Long sydId);


    /****
     * 添加任务审核
     * @param bdvo
     * @param sydId
     * @return
     */
    public boolean addTaskCallback(BaseDataVo bdvo, Long sydId);


    /****
     * 添加任务审核
     * @param bdvo
     * @param sydId
     * @return
     */
    public boolean addSignCallback(BaseDataVo bdvo, Long sydId);






    /***
     * 根据企业id，同步企业任务类型
     * @param businessId
     * @return
     */
    public boolean synQueryTaskTypes(String businessId, Long sydId);


    /****
     * 根据企业id，查询企业入驻结果
     * @param businessId
     * @param sydId
     * @return
     */
    public boolean addMerchantResultSel(String businessId,Long sydId);


    /*******
     * 查询税源地信息
     * @param businessId
     * @param sydId
     * @return
     */
    public boolean  queryPark(String businessId,Long sydId);


    /***
     * 查询批量认领的结果
     * @param merchant
     * @param syd
     * @param task
     * @param bill
     * @param detail
     * @return
     */
    public Boolean queryBatchSel(BusMerchant merchant, SysSyd syd, MerTask task, MerBill bill, List<MerBillDetail> detail);


    /**********
     * 结算批量结算的结果查询
     * @param merchant
     * @param syd
     * @param bill
     * @param detail
     * @return
     */
    public Boolean settleQueryBatchSel(BusMerchant merchant,SysSyd syd,MerBill bill,List<MerBillDetail> detail);


    /******
     * 充值回调
     * @param bdvo
     */
    void rechargeCallback(BaseDataVo bdvo);



    public Boolean settleRetreat(BusMerchant merchant,Long sydId,String startTime,String endTime);

    void invoiceCallback(BaseDataVo bdvo, Long sydId);

    /****
     * 完税证明下载
     * @param merchant
     * @param syd
     * @param month
     * @return
     */
    public Boolean taxpayDownLoad(BusMerchant merchant,SysSyd syd,String month);
}
