package com.hzs.scm.pub.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.scm.pub.ScmItemSpecs;

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

/**
 * <p>
 * 订单规格明细 服务类
 * </p>
 *
 * @author hzs
 * @since 2023-11-21
 */
public interface IScmItemSpecsService extends IService<ScmItemSpecs> {

    /*
     * @description: 根据主表主键删除数据
     * @author: sui q
     * @date: 2023/11/21 13:44
     * @param: null null
     **/
    void deleteItemSpecsById(Integer orderType, Long pkId, Long pkMember);

    /*
     * @description: 封装多规格
     * @author: sui q
     * @date: 2023/11/22 11:19
     * @param: null null
     **/
    void packageScmItemByParam(List<?> itemSpecsParamList, Object obj, Integer pkCountry, Long pkMember,
                                             Long pkOrder, Long pkOrderItems, Integer orderType);

    /*
     * @description: 封装规格明细，根据上游单价
     * @author: sui q
     * @date: 2023/11/24 11:08
     * @param: null null
     **/
    void packageScmItemSpecsList(List<ScmItemSpecs> scmItemSpecList, Long pkMember,
                                 Long pkOrder, Long pkOrderItems, Integer orderType);

    /*
     * @description: 保存完主表跟明细表后，根据主键回写规格表
     * @author: sui q
     * @date: 2023/11/22 13:59
     * @param: null null
     **/
    List<ScmItemSpecs> packageOrderItemsSpecs(List<?> itemsList, Long pkMasterId);

    /*
     * @description: 根据主表主键，子表主键 单据类型查询规格List
     * @author: sui q
     * @date: 2023/11/24 10:34
     * @param: null null
     **/
    Map<Long, List<ScmItemSpecs>> queryScmItemSpecsByCondition(Integer orderType, List<ScmItemSpecs> scmItemSpecsList);
}
