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

import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesContainerPackageDetailContext;
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionPsOutContext;
import cn.estsh.i3plus.pojo.mes.bean.MesContainerPackage;
import cn.estsh.i3plus.pojo.mes.bean.MesContainerPackageDetail;
import cn.estsh.i3plus.pojo.mes.bean.MesContainerSnStation;
import cn.estsh.i3plus.pojo.mes.bean.MesStation;
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
import io.swagger.annotations.ApiOperation;

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

public interface IMesStationContainerSnExtService {

    @ApiOperation(value = "根据设备代码查询站点信息")
    List<MesStation> getStationList(String organizeCode, String equipmentCode);

    @ApiOperation(value = "获取站点关联的容器条码")
    Map<String, List<MesContainerSnStation>> getContainerSnStationMap(String organizeCode, List<MesStation> stationList);

    @ApiOperation(value = "获取站点关联的容器条码")
    List<MesContainerSnStation> getContainerSnStationList(String organizeCode, List<MesStation> stationList);

    @ApiOperation(value = "获取站点关联的容器条码")
    List<MesContainerSnStation> getContainerSnStationListByStation(String organizeCode, List<String> stationList);

    @ApiOperation(value = "获取容器条码上料明细表信息【可扣减】【根据 主表seq,主表createDatetime,明细表createDatetime 正序】")
    List<MesContainerPackageDetailContext> getContainerPackageDetailContext(String organizeCode, List<MesStation> stationList);

    @ApiOperation(value = "获取容器条码上料主表信息")
    List<MesContainerPackage> getContainerPackageList(String organizeCode, List<MesContainerSnStation> containerSnStationList, Integer packageStatus);

    @ApiOperation(value = "获取容器条码上料主表信息")
    List<MesContainerPackage> getContainerPackageListByContainerSn(String organizeCode, List<String> containerSnList, Integer packageStatus);

    @ApiOperation(value = "获取容器条码上料明细表信息【可扣减】")
    List<MesContainerPackageDetail> getContainerPackageDetailList(String organizeCode, List<MesContainerPackage> containerPackageList);

    @ApiOperation(value = "获取容器条码上料明细表信息【可扣减】")
    List<MesContainerPackageDetail> getContainerPackageDetailListById(String organizeCode, List<Long> idList);

    @ApiOperation(value = "获取容器条码的一条上料明细表信息【可扣减】")
    Boolean checkIsExistContainerPackageDetail(String organizeCode, Long id);

    @ApiOperation(value = "写入扣料记录")
    void insertContainerPackageDetailFeeding(StationRequestBean reqBean, MesContainerPackageDetailContext containerPackageDetailContext, MesProductionPsOutContext productionPsOutContext);

    @ApiOperation(value = "修改上料明细表信息状态")
    void updateContainerPackageDetail(String organizeCode, String userInfo, Long id, Integer snStatus);

}
