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

import cn.estsh.i3plus.pojo.mes.bean.MesProductionRecord;
import cn.estsh.impp.framework.boot.util.ResultBean;
import io.swagger.annotations.ApiOperation;

import java.util.List;

/**
 * @Description : 生产加工记录接口
 * @Reference :
 * @Author : Castle
 * @CreateDate : 2024/6/20 21:05
 * @Modify:
 **/
public interface IMesProductionRecordService {

    @ApiOperation(value = "根据零件条码查询加工记录信息")
    List<MesProductionRecord> findProductionRecordList(String organizeCode, String productSn);

    @ApiOperation(value = "根据零件条码和工艺查询加工记录")
    Integer findFrontProcessProductionRecord(String organizeCode, String productSn,String craftCode);

    @ApiOperation(value = "查询加工记录, 根据完成时间倒序")
    List<MesProductionRecord> findProductionRecordListCompleteDateTimeDesc(String organizeCode, String productSn);

    @ApiOperation(value = "根据零件条码,零件编码查询加工记录信息")
    List<MesProductionRecord> findProductionRecordList(String organizeCode, String productSn, String partNo);

    @ApiOperation(value = "根据零件条码,物料编码,工序代码,工艺代码查询加工记录信息")
    List<MesProductionRecord> findProductionRecordList(String organizeCode, String productSn, String partNo, String processCode, String craftCode);

    @ApiOperation(value = "根据零件条码,物料编码,工艺代码查询加工记录信息")
    List<MesProductionRecord> findProductionRecordListByCraft(String organizeCode, String productSn, String craftCode);

    @ApiOperation(value = "根据工单,汇报状态查询加工记录信息")
    List<MesProductionRecord> findProductionRecordList(String organizeCode, List<String> orderNoList, Integer reportStatus);

    void updateProductionRecord(String organizeCode, String userName, String sn);

    void updateProductionRecord(String organizeCode, String userName, Long id, String errorMsg);

    @ApiOperation(value = "查询加工记录信息PDA报表")
    ResultBean queryMesProductionRecordReport(String organizeCode, String productSn);

    @ApiOperation(value = "更新加工记录")
    void updateProductionRecord(List<MesProductionRecord> recordList,String userName,Integer reportStatus,String msg);

}
