/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.youchain.businessdata.service;

import com.youchain.RequestData.Yclbl;
import com.youchain.businessdata.domain.Pick;
import com.youchain.businessdata.domain.PickDetail;
import com.youchain.businessdata.service.dto.PickDto;
import com.youchain.businessdata.service.dto.PickQueryCriteria;
import org.springframework.data.domain.Pageable;

import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
 * @author huojin
 * @website https://eladmin.vip
 * @description 服务接口
 * @date 2024-06-11
 **/
public interface PickService {

    /**
     * 查询数据分页
     *
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String, Object>
     */
    Map<String, Object> queryAll(PickQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     *
     * @param criteria 条件参数
     * @return List<PickDto>
     */
    List<PickDto> queryAll(PickQueryCriteria criteria);

    /**
     * 根据ID查询
     *
     * @param id ID
     * @return PickDto
     */
    PickDto findById(Long id);

    /**
     * 创建
     *
     * @param resources /
     * @return PickDto
     */
    PickDto create(Pick resources);

    /**
     * 编辑
     *
     * @param resources /
     */
    void update(Pick resources);

    /**
     * 多选删除
     *
     * @param ids /
     */
    void deleteAll(Long[] ids);

    /**
     * 导出数据
     *
     * @param all      待导出的数据
     * @param response /
     * @throws IOException /
     */
    void download(List<PickDto> all, HttpServletResponse response) throws IOException;

    /**
     * 成品叫料
     *
     * @param gdNo->订单号
     * @param completeCode->成套代码
     * @param station->需求工位
     * @param pointCode->需求点位
     */
    void bigItemCall(String gdNo, String completeCode, String station, String pointCode);

    /**
     * 单品叫料
     *
     * @param gdNo->订单号
     * @param itemCode->物料代码
     * @param station->需求工位
     * @param pointCode->需求点位
     */
    void itemCall(String gdNo, String itemCode, String station, String pointCode);

    /**
     * 原材料备料
     *
     * @param yclbl 原材料备料
     */
    void materialBl(Yclbl yclbl) ;

    /**
     * 根据出库单备料
     *
     * @param pick->出库单
     */
    void materialPick(Pick pick);

    List<PickDetail> queryPickDetail(Long pickId);
}
