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

import cn.estsh.i3plus.ext.mes.pcn.pojo.context.*;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesWorkOrderCutDetailModel;
import cn.estsh.i3plus.pojo.mes.bean.MesQueueOrderPush;
import cn.estsh.i3plus.pojo.mes.bean.MesRawPartCharging;
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingQueue;
import cn.estsh.i3plus.pojo.mes.model.StationKvBean;
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
import io.swagger.annotations.ApiOperation;

import java.util.List;

/**
 * 获取生产过程上下文对象接口【BUSI】
 */
public interface IMesProductionDispatchContextStepService {

    @ApiOperation(value = "清除上下文中的所有业务数据")
    void flushProductionDispatchContext(StationRequestBean reqBean);

    @ApiOperation(value = "存储展示组件MODULE_CONTENT内容")
    Boolean dispatchModuleContentContext(StationRequestBean reqBean, List<List<StationKvBean>> dataList);

    @ApiOperation(value = "获取展示组件MODULE_CONTENT内容")
    List<List<StationKvBean>> getModuleContentContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文加工结果")
    String getProductResultContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文加工结果")
    Integer getProductResultQcContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文加工结果", notes = "加工结果:成功/报废/可疑 【写入的值是变量类别代码对应的条码质量状态】【报废/可疑: 在保存逻辑条码时有特殊业务处理】")
    Boolean dispatchProductResultContext(StationRequestBean reqBean, String productResult);

    @ApiOperation(value = "删除上下文加工结果")
    void removeProductResultContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文就绪信号")
    String getReadySignalContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文就绪信号", notes = "写1")
    Boolean dispatchReadySignalContext(StationRequestBean reqBean);

    @ApiOperation(value = "删除上下文就绪信号")
    void removeReadySignalContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文发送允许加工指令执行结果")
    String getSendProcessCmdContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文发送允许加工指令执行结果", notes = "写接口逻辑的参考值")
    Boolean dispatchSendProcessCmdContext(StationRequestBean reqBean, String value);

    @ApiOperation(value = "删除上下文发送允许加工指令执行结果")
    void removeSendProcessCmdContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文头道模具号")
    MesEquipVariableCollectContext getFirstMouldNoContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证上下文头道模具号是否存在")
    Boolean checkFirstMouldNoIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文头道模具号", notes = "[JSON]MesEquipVariableCollectContext::equipVariableValue")
    Boolean dispatchFirstMouldNoContext(StationRequestBean reqBean, MesEquipVariableCollectContext firstMouldNo);

    @ApiOperation(value = "删除上下文头道模具号")
    void removeFirstMouldNoContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文产出零件信息")
    List<MesProductionPartContext> getProductionPartContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证上下文产出零件信息是否存在")
    Boolean checkProductionPartIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文产出零件信息", notes = "[JSON]List<MesProductionPartContext>")
    Boolean dispatchProductionPartContext(StationRequestBean reqBean, List<MesProductionPartContext> productionPartContextList);

    @ApiOperation(value = "删除上下文产出零件信息")
    Boolean removeProductionPartContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文模具号")
    MesEquipVariableCollectContext getMouldNoContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证上下文模具号是否存在")
    Boolean checkMouldNoIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文模具号", notes = "[JSON]MesEquipVariableCollectContext::equipVariableValue")
    Boolean dispatchMouldNoContext(StationRequestBean reqBean, MesEquipVariableCollectContext mouldNo);

    @ApiOperation(value = "删除上下文模具号")
    void removeMouldNoContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文生产扫/读信息:加工单")
    List<MesEquipVariableCollectContext> getScanWorkOrderNoContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证上下文扫/读信息:加工单是否存在")
    Boolean checkScanWorkOrderNoIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文扫/读信息:加工单", notes = "[JSON]List<MesEquipVariableCollectContext>")
    Boolean dispatchScanWorkOrderNoContext(StationRequestBean reqBean, List<MesEquipVariableCollectContext> workOrderNoList);

    @ApiOperation(value = "删除上下文扫/读信息:加工单")
    void removeScanWorkOrderNoContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文生产扫/读信息:主条码")
    List<MesEquipVariableCollectContext> getScanProductSnContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证上下文扫/读信息:主条码是否存在")
    Boolean checkScanProductSnIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文扫/读信息:主条码", notes = "[JSON]List<MesEquipVariableCollectContext>")
    Boolean dispatchScanProductSnContext(StationRequestBean reqBean, List<MesEquipVariableCollectContext> productSnList);

    @ApiOperation(value = "删除上下文扫/读信息:主条码")
    void removeScanProductSnContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文生产扫/读信息:装配件条码")
    List<MesEquipVariableCollectContext> getScanAssemblySnContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证上下文扫/读信息:装配件条码是否存在")
    Boolean checkScanAssemblySnIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文扫/读信息:装配件条码", notes = "[JSON]List<MesEquipVariableCollectContext>")
    Boolean dispatchScanAssemblySnContext(StationRequestBean reqBean, List<MesEquipVariableCollectContext> assemblySnList);

    @ApiOperation(value = "删除上下文扫/读信息:装配件条码")
    void removeScanAssemblySnContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取进料主条码数据信息")
    List<MesProductionPsInContext> getProductionPsInContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证进料主条码数据是否存在")
    Boolean checkProductionPsInIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存进料主条码数据", notes = "[JSON]List<MesProductionPsInContext>")
    Boolean dispatchProductionPsInContext(StationRequestBean reqBean, List<MesProductionPsInContext> productionPsInContextList);

    @ApiOperation(value = "删除进料主条码数据")
    Boolean removeProductionPsInContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文产出条码数据信息集合")
    List<MesProductionPsOutContext> getProductionPsOutContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证上下文产出条码数据信息集合是否存在")
    Boolean checkProductionPsOutIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文产出条码数据信息集合", notes = "[JSON]List<MesProductionPsOutContext>")
    Boolean dispatchProductionPsOutContext(StationRequestBean reqBean, List<MesProductionPsOutContext> productionPsOutContextList);

    @ApiOperation(value = "删除上下文产出条码数据信息集合")
    void removeProductionPsOutContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文产品加工规则数据信息集合")
    List<MesProdRuleContext> getProdRuleDataContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文产品加工规则数据信息集合")
    List<MesProdRuleContext> getProdRuleDataContext(String organizeCode, String workCenterCode, String workCellCode);

    @ApiOperation(value = "验证上下文产品加工规则信息集合是否存在")
    Boolean checkProdRuleDataIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文产品加工规则信息集合", notes = "[JSON]List<MesProdRuleContext>")
    Boolean dispatchProdRuleDataContext(StationRequestBean reqBean, List<MesProdRuleContext> prodRuleContextList);

    @ApiOperation(value = "删除上下文产品加工规则信息集合")
    void removeProdRuleDataContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取料桶原材料数据集合")
    List<MesRawPartCharging> getMesRawPartChargingDataContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存料桶原材料数据集合", notes = "[JSON]List<MesRawPartCharging>")
    Boolean dispatchMesRawPartChargingDataContext(StationRequestBean reqBean, List<MesRawPartCharging> mesRawPartChargingList);

    @ApiOperation(value = "删除料桶原材料数据集合")
    void removeMesRawPartChargingDataContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取裁片成品数据集合")
    List<MesWorkOrderCutDetailModel> getMesWorkOrderCutFgDataContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存裁片成品数据集合", notes = "[JSON]List<MesWorkOrderCutDetailModel>")
    Boolean dispatchMesWorkOrderCutFgDataContext(StationRequestBean reqBean, List<MesWorkOrderCutDetailModel> workOrderCutDetailModelList);

    @ApiOperation(value = "删除裁片成品数据集合")
    void removeMesWorkOrderCutFgDataContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证工步集死循环执行时是否超过最大执行次数")
    Boolean dispatchOverEndlessLoopReadTimes(StationRequestBean reqBean, String maxTimes);

    @ApiOperation(value = "获取上下文生产扫/读信息:可回用包装条码")
    List<MesEquipVariableCollectContext> getScanRecyclablePackageContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证上下文扫/读信息:可回用包装条码是否存在")
    Boolean checkScanRecyclablePackageIsExistContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文扫/读信息:可回用包装条码", notes = "[JSON]List<MesEquipVariableCollectContext>")
    Boolean dispatchScanRecyclablePackageContext(StationRequestBean reqBean, List<MesEquipVariableCollectContext> productSnList);

    @ApiOperation(value = "删除上下文扫/读信息:可回用包装条码")
    void removeScanRecyclablePackageContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取进料可回用包装信息")
    List<MesProductionRecyclablePackageContext> getProductionRecyclablePackageContext(StationRequestBean reqBean);

    @ApiOperation(value = "验证进料可回用包装是否存在")
    Boolean checkProductionRecyclablePackageContextIsExist(StationRequestBean reqBean);

    @ApiOperation(value = "保存进料可回用包装", notes = "[JSON]List<MesProductionRecyclablePackageContext>")
    Boolean dispatchProductionRecyclablePackageContext(StationRequestBean reqBean, List<MesProductionRecyclablePackageContext> recyclablePackageContextList);

    @ApiOperation(value = "删除进料可回用包装")
    Boolean removeProductionRecyclablePackageContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文临时数据信息集合")
    List<MesProdTempDataContext> getProdTempDataContext(StationRequestBean reqBean);

    @ApiOperation(value = "获取上下文临时数据信息集合")
    List<MesProdTempDataContext> getProdTempDataContext(String organizeCode, String workCenterCode, String workCellCode);

    @ApiOperation(value = "保存上下文临时数据信息集合")
    Boolean dispatchProdTempDataContext(StationRequestBean reqBean, List<MesProdTempDataContext> prodTempDataContextList);

    @ApiOperation(value = "保存上下文临时数据信息集合")
    Boolean dispatchProdTempDataContext(String organizeCode, String workCenterCode, String workCellCode, List<MesProdTempDataContext> prodTempDataContextList);

    @ApiOperation(value = "删除上下文临时数据信息集合")
    void removeProdTempDataContext(StationRequestBean reqBean);

    @ApiOperation(value = "删除上下文临时数据信息集合")
    void removeProdTempDataContext(String organizeCode, String workCenterCode, String workCellCode);

    @ApiOperation(value = "获取上下文发运队列信息")
    MesShippingQueue getShippingQueueContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文发运队列信息")
    Boolean dispatchShippingQueueContext(StationRequestBean reqBean, MesShippingQueue shippingQueue);

    @ApiOperation(value = "获取上下文推单队列信息")
    List<MesQueueOrderPush> getSortQueuePushContext(StationRequestBean reqBean);

    @ApiOperation(value = "保存上下文推单队列信息")
    Boolean dispatchSortQueuePushContext(StationRequestBean reqBean, List<MesQueueOrderPush> queueOrderPushList);

}
