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

import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
import io.swagger.annotations.ApiOperation;

import java.util.List;

public interface IJxWorkOrderService {

    /**
     * 删除返工条码
     * @param workOrderNo
     * @return
     */
    void deleteSnRepairByType(String workOrderNo, String[] produceSnArr, String organizeCode, String userName);

    /**
     * 删除返工条码
     * @param workOrderNo
     * @return
     */
    void deleteProduceSnRepair(String workOrderNo, String[] produceSnArr, String organizeCode, String userName);

    /**
     * 删除返工条码
     * @param workOrderNo
     * @return
     */
    void deletePackageNoRepair(String workOrderNo, String[] packageNoArr, String organizeCode, String userName);

    /**
     * 查询组件返工条码
     * @param workOrderNo
     * @return
     */
    ListPager queryRepairSnByPager(String workOrderNo, String packageNo, String organizeCode, Pager pager);

    /**
     * 查询组件返工条码
     * @param workOrderNo
     * @return
     */
    ListPager queryRepairPackageByPager(String workOrderNo, String packageNo, String organizeCode, Pager pager);

    /**
     * 查询本体返工条码
     * @param workOrderNo
     * @return
     */
    ListPager queryRepairProduceSnByPager(String workOrderNo, String sn, String organizeCode, Pager pager);


    /**
     * 查询生产工单信息
     *
     * @param workOrder 查询条件
     * @return 生产工单信息
     */
    @ApiOperation(value = "查询生产工单信息", notes = "查询生产工单信息")
    List<MesWorkOrder> queryWorkOrderListByModifyDatetime(MesWorkOrder workOrder);

    /**
     * 根据工单号集合获取工单信息
     * @param workOrderNoList 工单号集合
     * @param organizeCode 组织代码
     */
    @ApiOperation(value = "根据工单号集合获取工单信息", notes = "根据工单号集合获取工单信息")
    List<MesWorkOrder> queryMesWorkOrderByOrderNoList(List<String> workOrderNoList, String organizeCode);
}
