package com.fjhx.service.logistics;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.base.BaseService;
import com.fjhx.entity.logistics.LogisticsDetails;
import com.fjhx.params.logistics.LogisticsDetailsVo;
import com.fjhx.params.stock.GetLogisticsDetailsDto;
import com.fjhx.params.stock.GetLogisticsDetailsVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 物流明细 服务类
 * </p>
 *
 * @author ${author}
 * @since 2022-11-30
 */
public interface LogisticsDetailsService extends BaseService<LogisticsDetails> {

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

    void add(LogisticsDetailsVo logisticsDetailsVo);

    void edit(LogisticsDetailsVo logisticsDetailsVo);

    void delete(LogisticsDetailsVo logisticsDetailsVo);

    /**
     * 根据物流单ID查询物流明细
     */
    List<GetLogisticsDetailsVo> getByLogisticsInfoId(GetLogisticsDetailsDto getLogisticsDetailsDto);

    /**
     * 获取已发货数量map
     *
     * @param purchaseId 采购单id
     * @return 已发货数量map<申购单id, 已发货数量>
     */
    Map<Long, BigDecimal> getDeliverQuantityMap(Long purchaseId);

}
