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

import cn.estsh.i3plus.ext.mes.pcn.pojo.model.jx.JxProdBusiStrategyParamsBuilder;
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
import cn.estsh.i3plus.pojo.mes.model.StepResult;
import io.swagger.annotations.ApiOperation;

public interface IJxProdBusiStrategyService {

    /**
     * 上线验证
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "上线验证", notes = "上线验证")
    default StepResult checkLineOn(JxProdBusiStrategyParamsBuilder params) { return StepResult.getSuccessComplete(); }

    /**
     * 上线绑定
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "上线绑定", notes = "上线绑定")
    default StepResult execLineOnBindMc(JxProdBusiStrategyParamsBuilder params) { return StepResult.getSuccessComplete(); }

    /**
     * 加工验证
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "加工验证", notes = "加工验证")
    default StepResult checkProcessing(JxProdBusiStrategyParamsBuilder params) { return StepResult.getSuccessComplete(); }

    /**
     * 终检验证
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "终检验证", notes = "终检验证")
    default StepResult checkFinalInspection(JxProdBusiStrategyParamsBuilder params) { return StepResult.getSuccessComplete(); }

    /**
     * 第三方产品条码验证
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "第三方产品条码验证", notes = "第三方产品条码验证")
    default StepResult checkThirdPartyPs(JxProdBusiStrategyParamsBuilder params) { return StepResult.getSuccessComplete(); }

    /**
     * 下线验证
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "下线验证", notes = "下线验证")
    default StepResult checkLineOff(JxProdBusiStrategyParamsBuilder params) { return StepResult.getSuccessComplete(); }

    /**
     * 下线完成
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "下线完成", notes = "下线完成")
    default StepResult execLineOff(JxProdBusiStrategyParamsBuilder params) { return StepResult.getSuccessComplete(); }

    /**
     * 从管理码开始查询业务数据
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "从管理码开始查询业务数据", notes = "从管理码开始查询业务数据")
    default JxProdBusiStrategyParamsBuilder queryBusiData4Mc(JxProdBusiStrategyParamsBuilder params) { return params; }

    /**
     * 从产品条码开始查询业务数据
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "从产品条码开始查询业务数据", notes = "从产品条码开始查询业务数据")
    default JxProdBusiStrategyParamsBuilder queryBusiData4Ps(JxProdBusiStrategyParamsBuilder params) { return params; }

    /**
     * 查询产品条码业务数据
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "查询产品条码业务数据", notes = "查询产品条码业务数据")
    default JxProdBusiStrategyParamsBuilder queryProduceSnInfo(JxProdBusiStrategyParamsBuilder params) { return params; }

    /**
     * 查询管理码业务数据
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "查询管理码业务数据", notes = "查询管理码业务数据")
    default JxProdBusiStrategyParamsBuilder queryManageCodeInfo(JxProdBusiStrategyParamsBuilder params) { return params; }

    /**
     * 获取生产工单已绑数据
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "获取生产工单已绑数据", notes = "获取生产工单已绑数据")
    default Integer queryOrderBindedQty(JxProdBusiStrategyParamsBuilder params) { return MesPcnExtConstWords.ZERO; }

    /**
     * 写入管理编码与工单条码关系信息
     * @param params 参数
     */
    @ApiOperation(value = "写入管理编码与工单条码关系信息", notes = "写入管理编码与工单条码关系信息")
    default void insertProduceSnMcRecord(JxProdBusiStrategyParamsBuilder params) {}

    /**
     * 完成上线
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "完成上线", notes = "完成上线")
    default StepResult execLineOnComplete(JxProdBusiStrategyParamsBuilder params) { return StepResult.getSuccessComplete(); }

    /**
     * 终检绑定
     * @param params 参数
     */
    @ApiOperation(value = "终检绑定", notes = "终检绑定")
    default void execFinalInspectionBindPs(JxProdBusiStrategyParamsBuilder params) {}

    /**
     * 终检标记返修
     * @param params 参数
     */
    @ApiOperation(value = "终检标记返修", notes = "终检标记返修")
    default void execFinalInspectionMarkRepair(JxProdBusiStrategyParamsBuilder params) {}

    /**
     * 写入条码履历
     * @param params 参数
     */
    @ApiOperation(value = "写入条码履历", notes = "写入条码履历")
    default void insertProduceSnTravel(JxProdBusiStrategyParamsBuilder params) {}

    /**
     * 验证流程工序
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "验证流程工序", notes = "验证流程工序")
    default StepResult checkSnProcessIsValid(JxProdBusiStrategyParamsBuilder params, StepResult stepResult) { return stepResult; }

    /**
     * 验证班次启动
     * @param params 参数
     * @return 结果
     */
    @ApiOperation(value = "验证班次启动", notes = "验证班次启动")
    default StepResult checkShiftStart(JxProdBusiStrategyParamsBuilder params) {return StepResult.getSuccessComplete(); }

    /**
     * 加工完成
     * @param params 参数
     */
    @ApiOperation(value = "加工完成", notes = "加工完成")
    default void execProcessing(JxProdBusiStrategyParamsBuilder params) {}

}
