package com.sw.mes.itemclean.clean.service;

import com.sw.mes.core.response.Result;
import com.sw.mes.itemclean.clean.domain.MaterialApplyOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sw.mes.itemclean.clean.domain.MaterialUnpackingDetail;
import com.sw.mes.itemclean.clean.dto.BoxInfoDto;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 领料单 服务类
 * </p>
 *
 * @author liuzemin
 * @since 2022-11-10
 */
public interface MaterialApplyOrderService extends IService<MaterialApplyOrder> {

    boolean insertOrUpdateMaterialApplyOrders(List<MaterialApplyOrder> materialApplyOrders);

    MaterialApplyOrder selectMaterialOrder(MaterialUnpackingDetail mterialUnpackingDetail);

    Result updateBoxByMaterialApplyOrder(MaterialApplyOrder materialApplyOrder);

    MaterialApplyOrder getByMaterialBoxNo(String materialBoxNo);

    MaterialApplyOrder getByBoxNo(String materialBoxNo);

    List<MaterialApplyOrder> pullMaterialData();

    List<MaterialApplyOrder> getMaterialApplyOrder(String materialName, String materialCode, Date startTime, Date endTime);

    void updatePulled(List<MaterialApplyOrder> list);

    BoxInfoDto getByBoxNoAndLastSit(String boxNo,String sourceProcess);

    MaterialApplyOrder getByProductBatchNo(String productBatchNo);
}

