package com.fjhx.service.logistics;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.base.BaseService;
import com.fjhx.entity.logistics.LogisticsInfo;
import com.fjhx.params.logistics.DeliverDetailsVo;
import com.fjhx.params.logistics.LogisticsInfoVo;
import com.fjhx.params.stock.InStockAdd;

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

/**
 * <p>
 * 物流信息 服务类
 * </p>
 *
 * @author ${author}
 * @since 2022-11-30
 */
public interface LogisticsInfoService extends BaseService<LogisticsInfo> {

    Page<LogisticsInfo> getPage(Map<String, Object> condition);

    void add(LogisticsInfoVo logisticsInfoVo);

    void edit(LogisticsInfoVo logisticsInfoVo);

    void delete(LogisticsInfoVo logisticsInfoVo);

    /**
     * 采购入库列表
     *
     * @param condition 查询条件
     * @return
     */
    Page<LogisticsInfo> getPurchaseInStockPage(Map<String, Object> condition);

    /**
     * 根据采购ID查询
     *
     * @param purchaseIds 采购ID集合
     * @return
     */
    List<LogisticsInfo> getByPurchaseIds(List<Long> purchaseIds);

    /**
     * 根据采购ID查询
     *
     * @param purchaseIds 采购ID集合
     * @return
     */
    Map<Long, List<LogisticsInfo>> getByPurchaseIdsToMap(List<Long> purchaseIds);

    /**
     * 根据物流单号跟新物流状态
     *
     * @param code  物流单号
     * @param state 物流状态
     */
    void updateStatusByCode(String code, Integer state);

    /**
     * 根据业务ID查询物流单号
     *
     * @param businessId 业务ID
     * @return
     */
    List<LogisticsInfo> codeSelectByBusinessId(Long businessId);

    /**
     * 发货通知-》发货明细
     */
    List<DeliverDetailsVo> deliverDetails(Long id);

    /**
     * 到货通知
     */
    void arrivalNotice(LogisticsInfoVo entity);

    void inStock(InStockAdd inStockAdd);

}
