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.LogisticsInfoVo;

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);

    /**
     * 根据采购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);
}
