package com.trade.service.thirdparty.xiaotu.service;

import com.trade.service.thirdparty.xiaotu.dto.*;
import com.trade.service.thirdparty.xiaotu.dto.filingdoc.FilingDocWriteRequest;

import java.util.List;

public interface XiaotuRequestService {

    /**
     * 用户信息注册
     * 
     * @param request
     * @return
     */
    RegisterUserResponse registerUser(RegisterUserRequest request);

    /**
     * 用户信息修改
     *
     * @param request
     * @return
     */
    Boolean updateUser(UpdateUserRequest request);

    /**
     * 根据用户uuid查询用户信息
     * 
     * @param userId
     * @return
     */
    UserInfoDto searchUserByUserId(String userId);

    /**
     * 根据用户登录名查询用户信息
     * 
     * @param userName
     * @return
     */
    UserInfoDto searchUserByUserName(String userName);

    /**
     * 企业信息注册
     *
     * @param request
     * @return
     */
    RegisterEnterpriseResponse registerEnterprise(RegisterEnterpriseRequest request);

    /**
     * 企业信息修改
     *
     * @param request
     * @return
     */
    Boolean updateEnterprise(UpdateEnterpriseRequest request);

    /**
     * 企业信息查询
     * 
     * @param xtUid
     * @param certNo
     * @param taxNo
     * @return
     */
    EnterpriseInfo searchEnterprise(String xtUid, String certNo, String taxNo);

    /**
     * 企业与用户绑定
     * 
     * @param xtUid
     * @param xtEid
     * @return
     */
    Boolean bindUserAndEnterprise(String xtUid, String xtEid);

    /**
     * 企业与用户解绑
     * 
     * @param xtUid
     * @param xtEid
     * @return
     */
    Boolean unbindUserAndEnterprise(String xtUid, String xtEid);

    /**
     * 退税税率查询接口
     *
     * @param commodityRequest
     * @param businessCommonRequest
     * @return CommodityResponse
     */
    List<CommodityResponse> taxRefundRateInquiry(CommodityRequest commodityRequest,
            BusinessCommonRequest businessCommonRequest);

    /**
     * 海关税则查询接口
     *
     * @param spid 商品id
     * @param businessCommonRequest
     * @return CommodityCustomsTariffRespose
     */
    List<CommodityCustomsTariffRespose> commodityCustomsTariffInquiry(String spid,
            BusinessCommonRequest businessCommonRequest);

    /**
     * 小图通用查询接口 - 带分页
     *
     * @param request 请求参数
     * @param businessCommonRequest 业务参数
     * @param <T> 返回类型
     * @return CommonQueryResponse<T>
     */
    <T extends CommonResultRows> CommonQueryResponse<T> queryCommonResponse(CommonQueryRequest request,
            BusinessCommonRequest businessCommonRequest, Class<T> clazz);

    /**
     * 报关单查询接口
     * 
     * @param request 报关单查询请求参数
     * @return List<CustomsDeclarationResponse> 报关单查询结果
     */
    List<CustomsDeclarationResponse> customsDeclarationInquiry(CustomsDeclarationRequest request,
            BusinessCommonRequest businessCommonRequest);

    /**
     * 发票查询接口
     *
     * @param request
     * @return
     */
    List<InvoiceQueryResponse> invoiceQuery(InvoiceQueryRequset request, BusinessCommonRequest businessCommonRequest);

    /**
     * 发票文件下载接口
     * 
     * @param jhpzh 进货凭证号是仅支持数电发票
     * @param businessCommonRequest
     * @return
     */
    InvoiceFileResponse invoiceFileQuery(String jhpzh, BusinessCommonRequest businessCommonRequest);

    /**
     * 获取进口退税申请跳转url
     *
     * @param xtUid
     * @param xtEid
     * @return
     */
    String getExportRebateUrl(String xtUid, String xtEid, String jumpUrl);

    /**
     * 查询出口/进货明细(外贸)
     *
     * @param request
     * @param businessCommonRequest
     * @return
     */
    CommonQueryResponse<TradeExportAndPurchaseDetailsResponse> queryTradeExportAndPurchaseDetails(ExportDetailsRequest request,
            BusinessCommonRequest businessCommonRequest);

    /**
     * 查询出口明细(生产)
     *
     * @param request
     * @param businessCommonRequest
     * @return
     */
    CommonQueryResponse<ProduceExportDetailsResponse> queryProduceExportDetails(ExportDetailsRequest request,
            BusinessCommonRequest businessCommonRequest);

    /**
     * 备案单证写入
     *
     * @param request 备案单证写入请求参数
     * @param businessCommonRequest 业务参数
     * @return InvoiceFileResponse 备案单证写入结果
     */
    boolean filingDocumentWrite(FilingDocWriteRequest request, BusinessCommonRequest businessCommonRequest);

    /**
     * 报关单/委托报关文件查询接口
     *
     * @param bgdhgbh 报关单海关编号
     * @param type 类型： 01-报关单 02-委托报关文件 10-同时下载报关单和委托报关协议文件
     * @param businessCommonRequest 业务参数
     * @return customsDeclarationFileResponse
     */
    customsDeclarationFileResponse customsDeclarationFileQuery(String bgdhgbh, String type,
            BusinessCommonRequest businessCommonRequest);
}
