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

import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrderCalcQtyRecord;
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IMesWorkOrderCalcQtyRestoreDispatchService {

    @ApiOperation(value = "查询生产工单计数记录表")
    List<MesWorkOrderCalcQtyRecord> getWorkOrderCalcQtyRecordList(String organizeCode, Integer qty);

    @ApiOperation(value = "查询工单")
    @Transactional(propagation = Propagation.NOT_SUPPORTED)
    MesWorkOrder getWorkOrderDb(String organizeCode, Long workOrderId);

    @ApiOperation(value = "补录生产工单计数JOB修改数据")
    @Transactional(propagation = Propagation.REQUIRES_NEW, noRollbackFor = {ImppBusiException.class, Exception.class})
    void doRestoreWorkOrderCalcQty(String organizeCode, MesWorkOrder workOrder, List<MesWorkOrderCalcQtyRecord> value);

    @ApiOperation(value = "修改记录状态")
    void saveWorkOrderCalcQtyRecord(String organizeCode, List<Long> idList, Integer dealStatus, String remark);

}
