package com.trade.service.trade.salesorder.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.trade.common.core.page.GridPage;
import com.trade.service.trade.salesorder.domain.CustomsDeclarationGoods;
import com.trade.service.thirdparty.xiaotu.dto.CustomsDeclarationResponse;
import com.trade.service.trade.salesorder.vo.CustomsDeclarationGoodsBelongsVO;
import com.trade.service.trade.salesorder.vo.CustomsDeclarationGoodsDtlVO;

import java.util.List;

/**
 * <p>
 * 报关单商品 服务类
 * </p>
 *
 * @author zhangchenm
 * @since 2024-09-20
 */
public interface ICustomsDeclarationGoodsService extends IService<CustomsDeclarationGoods> {

    void addCustomsDeclarationGoods(CustomsDeclarationResponse customsDeclarationResponse);

    List<CustomsDeclarationGoodsDtlVO> listWithCustomsDeclarationDtlByOrderId(Long orderId);

    void updateCustomsDeclarationGoods(CustomsDeclarationResponse customsDeclarationResponse, Long id);

    /**
     * 根据出口报关单号获取报关单商品
     * 
     * @param ckbgdh 出口报关单号
     * @return 报关单商品
     */
    CustomsDeclarationGoods getByCkbgdh(String ckbgdh);

    /**
     * 根据报关单号获取报关单商品
     * 
     * @param bgdhgbh 报关单号<报关单海关编号>
     * @return 报关单商品
     */
    List<CustomsDeclarationGoods> getByBgdh(String bgdhgbh);

    /**
     * 更新“退税记录是否已同步” 为已完成
     * @param ids
     */
    void updateTsjltbbsDoneByIds(List<Long> ids);

    /**
     * 获取需要获取进出口退税的商品记录
     * @param pageNum
     * @param pageSize
     * @return
     */
    GridPage<CustomsDeclarationGoodsBelongsVO> getAllNeedPullTaxRebateRecords(int pageNum, int pageSize);
}
