package com.sw.mes.yb.accessory.service;

import com.sw.mes.yb.accessory.dto.AccessoryApplyDto;
import com.sw.mes.yb.accessory.dto.IdDto;
import com.sw.mes.yb.accessory.entity.AccessoryApply;
import com.sw.mes.core.base.BaseService;
import com.sw.mes.yb.accessory.entity.AccessoryLog;
import com.sw.mes.yb.accessory.vo.RequestWmsVo;
import com.sw.mes.yb.accessory.vo.ToMaterialApplyVo;

import java.util.Date;


/**
 * @Author
 * @Description：
 * @Date:
 * @Modified By:
 */
public interface AccessoryApplyService extends BaseService<AccessoryApply> {

    AccessoryApply findByGoodsCodeAndState(String goodsCode, String state);

    AccessoryApply findByGoodsCodeAndEquipmentIdAndState(String goodsCode, Long equipmentId, String state);

    void apply(IdDto dto) throws RuntimeException;

    void cancel(Long id);

    void apply1(AccessoryApplyDto dto);

    AccessoryApply findByPickNo(String pickNo);

    AccessoryApply findByApplyDateAndGoodsCode(Date applyDate, String goodsCode);

    String toWmsApply(RequestWmsVo requestWmsVo, AccessoryLog accessoryLog, String url);

    void cancelByOrderNum(String orderNum);
}
