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

import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProdRuleContext;
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionAssemblyContext;
import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleIgnoreCfg;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkCenter;
import io.swagger.annotations.ApiOperation;

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

public interface IMesNumberRuleMatchDispatchService {

    @ApiOperation(value = "编码规则匹配")
    default List<?> matchNumberRule(String organizeCode, String sn, List<?> numberRuleList) { return numberRuleList; }

    @ApiOperation(value = "编码规则匹配")
    default Map<String, Object> matchNumberRule(String organizeCode, String sn, Object numberRuleObj) { return null; }

    @ApiOperation(value = "编码规则匹配")
    default Map<String, Object> matchNumberRule(String organizeCode, String sn, Object... params) { return null; }

    @ApiOperation(value = "验证装配件条码在当前开模中的唯一性")
    default Boolean checkAssemblySnUniqueInMould(MesWorkCenter workCenter, List<MesProdRuleContext> prodRuleContextList, List<? extends MesProductionAssemblyContext> productionAssemblyContextList, String assemblySn) { return true; }

    @ApiOperation(value = "验证装配件条码在当前开模中的唯一性")
    default Boolean checkAssemblySnUniqueInMould(MesWorkCenter workCenter, List<MesProdRuleContext> prodRuleContextList, String assemblySn) { return true; }

    @ApiOperation(value = "验证装配件条码在当前开模中的唯一性")
    default Boolean checkAssemblySnUniqueInMould(List<? extends MesProductionAssemblyContext> productionAssemblyContextList, String assemblySn) { return true; }

    @ApiOperation(value = "匹配不可用规则")
    default Map<String, Object> matchIgnoreCfg(String organizeCode, String sn, Map<String, Object> result, List<MesProdRuleIgnoreCfg> prodRuleIgnoreCfgList) { return null; }

}
