package cn.estsh.i3plus.ext.mes.pcn.api.base.ep;

import cn.estsh.i3plus.ext.mes.pcn.pojo.bean.MesRepairRecordExt;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.RepairRequestModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.ep.EpBadCellDetailModel;
import io.swagger.annotations.ApiOperation;

/**
 * @Author: xiangming.liao
 * @CreateDate: 2021/02/26
 * @Description:
 **/
public interface IEpSxRepairWorkService {

    /**
     * 本体/组件返修-不良明细-新增
     * @param mesBadCellDetail 不良记录
     */
    @ApiOperation(value = "本体/组件返修-不良明细-新增", notes = "本体/组件返修-不良明细-新增")
    void insertMesBadCellDetail(EpBadCellDetailModel mesBadCellDetail);

    /**
     * 本体/组件返修-维修明细-新增
     *
     * @param repairRecord    维修记录
     */
    @ApiOperation(value = "本体/组件返修-维修明细-新增", notes = "本体/组件返修-维修明细-新增")
    void insertMesRepairRecord(MesRepairRecordExt repairRecord);

    /**
     * 本体/组件返修-维修明细-修改
     *
     * @param repairRecord    维修记录
     */
    @ApiOperation(value = "本体/组件返修-维修明细-修改", notes = "本体/组件返修-维修明细-修改")
    void updateMesRepairRecord(MesRepairRecordExt repairRecord);

    /**
     * 本体/组件返修-一步操作
     * @param requestModel  一步操作数据
     */
    @ApiOperation(value = "本体/组件返修-一步操作", notes = "本体/组件返修-一步操作")
    void insertMesRepairDefectRecord(RepairRequestModel requestModel);

    /**
     * 本体返修-维修完成
     *
     * @param serialNumber 产品条码
     * @param defectType 不良类型代码
     * @param organizeCode 组织代码
     * @param modifyUser   修改人
     */
    @ApiOperation(value = "本体返修-维修完成", notes = "本体返修-维修完成")
    void updateRepairComplete(String serialNumber, String defectType, String organizeCode, String modifyUser);

    /**
     * 组件返修-维修完成
     *
     * @param workOrderNo  工单编码
     * @param defectType  不良类型代码
     * @param organizeCode 组织代码
     * @param modifyUser   修改人
     */
    @ApiOperation(value = "组件返修-维修完成", notes = "组件返修-维修完成")
    void updateRepairBatchComplete(String workOrderNo, String defectType, Double defectQty, String organizeCode, String modifyUser);

}
