package com.rongwei.bscommon.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rongwei.bsentity.domain.ApsOrderAlloyCompositionDo;
import com.rongwei.bsentity.domain.ApsProcessOutputProductDo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 *
 */
public interface ApsProcessOutputProductDao extends BaseMapper<ApsProcessOutputProductDo> {
    @Select("SELECT * FROM aps_process_output_product WHERE  DELETED = 0 AND BLANKID = #{blankid}")
    List<ApsProcessOutputProductDo> getProcessOutputProductByBlankId(@Param("blankid") String blankid);
    @Select("SELECT * FROM aps_process_output_product WHERE  DELETED = 0 AND PRODUCTID = #{productid}")
    List<ApsProcessOutputProductDo> getProcessOutputProductByProductid(@Param("productid") String productid);

    @Update("update aps_process_output_product set ROLLNUM = ROLLNUM+1 where ID = #{outputid}")
    void updateRollNumById(@Param("outputid") String outputid);
}




