package cn.estsh.i3plus.ext.mes.pcn.api.busi;

import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
import cn.estsh.i3plus.pojo.mes.bean.MesQueueOrder;
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
import io.swagger.annotations.ApiOperation;

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

public interface IMesProduceSnExtService {
    @ApiOperation(value = "装箱防错获取正常的条码")
    MesProduceSn getProduceSnForBox(String produceSn ,String PartNo,String organizeCode);

    @ApiOperation(value = "根据零件条码查询零件条码信息")
    List<MesProduceSn> getProduceSnList(String organizeCode, List<String> productSnList);

    @ApiOperation(value = "根据零件条码查询零件条码信息")
    List<MesProduceSn> getProduceSnList(String organizeCode, String productSn);

    @ApiOperation(value = "根据零件条码查询零件条码信息, 创建时间倒序")
    List<MesProduceSn> getProduceSnListCreateDatetimeDesc(String organizeCode, String productSn);

    @ApiOperation(value = "根据产品条码查询零件条码信息[非排序],创建时间最新")
    MesProduceSn getProduceSnCreateDatetimeDesc(String organizeCode, String productSn);

    @ApiOperation(value = "根据客户条码查询零件条码信息[排序]")
    MesProduceSn getProduceSnByCustSn(String organizeCode, String custSn);

    @ApiOperation(value = "根据产品条码查询零件条码信息[排序]")
    MesProduceSn getProduceSn(String organizeCode, String productSn, String workOrderNo);

    @ApiOperation(value = "根据零件条码ID查询零件条码信息")
    MesProduceSn getProduceSn(String organizeCode, Long id);

    @ApiOperation(value = "根据零件条码查询零件条码信息")
    Map<String, List<MesProduceSn>> getProduceSnMap(String organizeCode, List<String> productSnList);

    @ApiOperation(value = "根据零件客户条码查询零件条码信息")
    List<MesProduceSn> findProduceSnByCustSn(String organizeCode, List<String> custSnList);

    @ApiOperation(value = "根据零件客户条码查询零件条码信息")
    Map<String, List<MesProduceSn>> getProduceSnByCustSnMap(String organizeCode, List<String> custSnList);

    @ApiOperation(value = "根据生产工单,生产线,工位查询工位队列信息")
    List<MesQueueOrder> getQueueOrderList(String organizeCode, String workCenterCode, String workCellCode, String workOrderNo);

    @ApiOperation(value = "根据零件条码,生产线,工位查询工位队列信息")
    List<MesQueueOrder> getQueueOrderList(String organizeCode, String workCenterCode, String workCellCode, List<String> productSnList);

    @ApiOperation(value = "根据零件条码,生产线,工位查询工位队列信息")
    MesQueueOrder getQueueOrder(String organizeCode, String workCenterCode, String workCellCode, String productSn);

    @ApiOperation(value = "根据零件条码,生产线,工位查询工位队列信息")
    Map<String, List<MesQueueOrder>> getQueueOrderMap(String organizeCode, String workCenterCode, String workCellCode, List<String> productSnList);

    @ApiOperation(value = "根据零件条码ID修改条码状态,工位")
    void saveProduceSnList(StationRequestBean reqBean, Integer snStatus, List<Long> idList);

    @ApiOperation(value = "根据条件修改条码状态")
    void saveProduceSnStatusByDdlPackBean(DdlPackBean packBean, String userInfo, Integer snStatus);

    MesProduceSn insert(MesProduceSn item);

    void update(MesProduceSn item);

    void updateNoSync(MesProduceSn item);

    @ApiOperation(value = "根据零件条码信息")
    ListPager<MesProduceSn> queryMesProduceSn(MesProduceSn mesProduceSn, Pager pager);

    @ApiOperation(value = "根据条码和工厂获取")
    String queryPartNoByProduceSn(String productSn,String organizeCode);
}
