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

import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesEquipmentSpotCheckModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesSpotCheckOrderModel;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.mes.bean.MesEquipmentSpotCheck;
import cn.estsh.i3plus.pojo.mes.bean.MesSpotCheckOrder;
import cn.estsh.i3plus.pojo.mes.bean.MesSpotCheckOrderResult;
import io.swagger.annotations.ApiOperation;

import java.util.List;

/**
 * @Description :
 * @Reference :
 * @Author :
 * @CreateDate : 2024-04-26 15:37
 * @Modify:
 **/
public interface IMesSpotCheckOrderService {

    /**
     * 、
     * 查询点检单
     *
     * @param spotCheckOrder
     * @param pager
     * @return
     */
    @ApiOperation("查询点检单")
    ListPager<MesSpotCheckOrder> querySpotCheckOrder(MesSpotCheckOrder spotCheckOrder, Pager pager);

    /**
     * 、
     * 查询点检单
     *
     * @param spotCheckOrder
     * @return
     */
    @ApiOperation("查询设备点检")
    List<MesEquipmentSpotCheckModel> findEquipmentSpotCheck(MesEquipmentSpotCheck spotCheckOrder);

    /**
     * 、
     * 查询点检单
     *
     * @param spotCheckOrder
     * @return
     */
    @ApiOperation("查询设备点检")
    List<MesEquipmentSpotCheck> queryEquipmentSpotCheck(MesEquipmentSpotCheck spotCheckOrder);


    /**
     * 查询点检单明细
     *
     * @param spotCheckOrder
     * @return
     */
    @ApiOperation("查询点检单明细")
    MesSpotCheckOrderModel querySpotCheckOrderResult(MesSpotCheckOrder spotCheckOrder);

    /**
     * 扫描产品条码
     *
     * @param model
     * @param org
     * @return
     */
    @ApiOperation("扫描产品条码")
    MesSpotCheckOrderModel scanProduceSn(MesSpotCheckOrderModel model, String org);

    /**
     * 开始点检-查询设备数据
     *
     * @param model
     * @param org
     * @return
     */
    @ApiOperation("开始点检-查询设备数据")
    MesSpotCheckOrderModel queryEquipInfo(MesSpotCheckOrderModel model, String org);

    /**
     * 开始点检-查询设备数据
     *
     * @param model
     * @param org
     * @return
     */
    @ApiOperation("完成点检")
    void saveCheck(MesSpotCheckOrderModel model, String org);

    /**
     * 开始点检-查询设备数据
     *
     * @param model
     * @param org
     * @return
     */
    @ApiOperation("重新点检")
    void saveReCheck(MesSpotCheckOrderModel model, String org);

    @ApiOperation(value = "新增信息", notes = "新增信息")
    MesSpotCheckOrder insert(MesSpotCheckOrder bean);

    @ApiOperation(value = "删除点检单", notes = "删除点检单")
    void deleteBatchIds(Long[] ids, String userName, String organizeCode);

    @ApiOperation("根据生产线代码,设备代码,点检项目ID集合 查询每个点检项目ID对应的最新的未完成的单据")
    List<MesSpotCheckOrder> getSpotCheckOrderList(String organizeCode, String workCenterCode, String equipmentCode, List<Long> spotCheckIdList);

    @ApiOperation("根据设备点检单据ID集合查询设备点检单据明细信息")
    List<MesSpotCheckOrderResult> getSpotCheckOrderResultList(String organizeCode, List<Long> spotCheckOrderIdList);

    @ApiOperation("根据设备点检单据ID集合查询后搜集点检项类型为自动类型的明细信息")
    List<MesSpotCheckOrderResult> getSpotCheckOrderResultAutoItemTypeList(String organizeCode, List<Long> spotCheckOrderIdList);

}
